Skip to content

Backend Routes

killacan edited this page Sep 6, 2022 · 4 revisions

Backend Routes

namespace :api, defaults: { format: :json } do
	resources :users, only: [:create, :destory, :show, :update]
	resources :games, only: [:show, :index]
	resources :reviews, only: [:create, :destory, :update]
	resource :session, only: [:create, :destroy, :show]
end
  • Users
    • create, user creation
    • destroy, user deletion
    • show, user show page/profile page
    • edit, where you can edit info about a user.
  • Games
    • games/:gameId
      • shows a game, and gets its reviews
    • games index
      • shows all games
  • reviews
    • user is able to create, destory, and update reviews that they have authored.

Clone this wiki locally