SECutiee / ScanChat-api

GNU General Public License v3.0
0 stars 0 forks source link

Week7 Project Assignment Feedback #5

Open twohorse0311 opened 4 months ago

twohorse0311 commented 4 months ago
  1. Highly recommend making your file name as same as your entity name in the model folder. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/models/chat.rb
  2. Add a , at line 35 and options after it if you would like to turn the parameter option into JSON. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/models/chat.rb#L27-L37
  3. Remove the test line. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/models/chat.rb#L103
  4. Make Message another file in the model folder, and as the issue mentioned at 2, put option into your hash structure if you want to use it. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/models/chat.rb#L82-L100
  5. Remove r.is can have the same route. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/controllers/app.rb#L39-L51
  6. Move Line 53 - Line62 under Line 24-Line 29 and modify the route, since it looks like they use the same id https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/controllers/app.rb#L53-L62 https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/controllers/app.rb#L24-L29