Open twohorse0311 opened 4 months ago
[ ] In line 58 @mes_route = "#{@api_root}/chatrooms/#{thread_id}/messages", you can use @chatroom_route, which you had set at line 54, to replace #{@api_root}/chatrooms. The result might be like: @mes_route = "#{@chatroom_route}/#{thread_id}/messages" https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/controllers/app.rb#L53-L58
@mes_route = "#{@api_root}/chatrooms/#{thread_id}/messages"
@chatroom_route
#{@api_root}/chatrooms
@mes_route = "#{@chatroom_route}/#{thread_id}/messages"
[ ] As the issue above, you can use @chatroom_route to replace part of the route in @mes_route https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/controllers/app.rb#L129-L135
@mes_route
[ ] After writing the above two points, I noticed that you have duplicate variable names @mes_route in your route! Please make sure to adjust this to avoid issues with global variable name duplication. https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/controllers/app.rb#L58 https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/controllers/app.rb#L134
[ ] Remove the useless comments. https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/services/add_member_to_chatroom.rb#L21-L36
[ ] In api_threads_spec.rb, the whole script is turned into comment. Make sure the spec is work. https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/spec/integration/api_threads_spec.rb
api_threads_spec.rb
If the checklist below is completed, you can tick the boxes. Please DO NOT close the Issue on your own.
[ ] In line 58
@mes_route = "#{@api_root}/chatrooms/#{thread_id}/messages"
, you can use@chatroom_route
, which you had set at line 54, to replace#{@api_root}/chatrooms
. The result might be like:@mes_route = "#{@chatroom_route}/#{thread_id}/messages"
https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/controllers/app.rb#L53-L58[ ] As the issue above, you can use
@chatroom_route
to replace part of the route in@mes_route
https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/controllers/app.rb#L129-L135[ ] After writing the above two points, I noticed that you have duplicate variable names
@mes_route
in your route! Please make sure to adjust this to avoid issues with global variable name duplication. https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/controllers/app.rb#L58 https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/controllers/app.rb#L134[ ] Remove the useless comments. https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/app/services/add_member_to_chatroom.rb#L21-L36
[ ] In
api_threads_spec.rb
, the whole script is turned into comment. Make sure the spec is work. https://github.com/SECutiee/ScanChat-api/blob/279833e9379ae58f5e257b4aa37f4a313d2f1ccc/spec/integration/api_threads_spec.rb