issues
search
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
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
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
Remove the test line.
https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/models/chat.rb#L103
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
Remove
r.is
can have the same route.
https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/controllers/app.rb#L39-L51
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
model
folder. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/models/chat.rb,
at line 35 andoptions
after it if you would like to turn the parameteroption
into JSON. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/models/chat.rb#L27-L37Message
another file in themodel
folder, and as the issue mentioned at2
, putoption
into your hash structure if you want to use it. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/models/chat.rb#L82-L100r.is
can have the same route. https://github.com/SECutiee/chat-api/blob/083c3cfca9deb59af6913841e8ebfd42b42319ea/app/controllers/app.rb#L39-L51id
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