Skip to content

Commit

Permalink
refactor: simplify message
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Jan 14, 2024
1 parent c721098 commit 9bfa0f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mihari/web/endpoints/artifacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Artifacts < Grape::API
end
end.to_result

message = queued ? "ID:#{id}'s enrichment has been queued" : "ID:#{id}'s enrichment has been succeeded"
message = queued ? "ID:#{id}'s enrichment is queued" : "ID:#{id}'s enrichment is successful"
return present({ message: message, queued: queued }, with: Entities::QueueMessage) if result.success?

case result.failure
Expand Down
2 changes: 1 addition & 1 deletion lib/mihari/web/endpoints/rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def call(yaml, overwrite: true)
end
end.to_result

message = queued ? "ID:#{id}'s search has been queued" : "ID:#{id}'s search has been succeed"
message = queued ? "ID:#{id}'s search is queued" : "ID:#{id}'s search is successful"
return present({ message: message, queued: queued }, with: Entities::QueueMessage) if result.success?

case result.failure
Expand Down

0 comments on commit 9bfa0f3

Please sign in to comment.