Clean-up endpoints for Equipment & Gym management
Closes #3 (closed)
General Details:
- Currently we will only support creating a gym from there backened. Time permitting we can add screens to allow users in-app to create gyms too.
- Ensure each route other than auth routes are "protected". Refer to Ktor sessions authentication. You can add the following at the beginning of every route:
val userSession = call.sessions.get<UserSession>()
- By the end of this ticket, we should be able to manage users, manage gym (CRUD), manage equipment within the gym (CRUD)
Endpoints to be completed:
gyms: GET: /gyms POST: /gyms PUT: /gyms/{id} DELETE: /gyms/{id}
gymAdmins: GET: /gyms/{gym_id}/admins POST: /gyms/{gym_id}/admins PUT: /gyms/{gym_id}/admin/{admin_id} DELETE: /gyms/{gym_id}/admin/{admin_id}
exercises: GET: gyms/{id}/exercises POST: gyms/{id]/exercises PUT: gyms/{id}/exercises/{id} DELETE: gyms/{id}/exercises/{id}