Skip to content

Commit e8a70a3

Browse files
committed
Greeting controller is working
1 parent 683d9d4 commit e8a70a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/v1/greetings_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ class V1::GreetingsController < ApplicationController
22
def index
33
@greeting = Greeting.order('RANDOM()').first
44
if @greeting
5-
render json: { success: true, message: 'Loaded greeting message', data: { greeting: @greeting } }, status: :ok
5+
render json: { success: true, message: 'Greeting message', data: { greeting: @greeting } }, status: :ok
66
else
7-
render json: { success: false, errors: 'Oops, Something went wrong!' }, status: :unprocessable_entity
7+
render json: { success: false, errors: 'Something went wrong!' }, status: :unprocessable_entity
88
end
99
end
1010
end

0 commit comments

Comments
 (0)