Skip to content

Weight-Lifting-Journal-bw-7/back-end

Repository files navigation

Back-End

Product Description

Weigh Lifting Journal is a web-based application that allows users to register and keep track of their weight lifting progress.
Once a user is registered, they will be able to login and add journal entries, Update their info (age, weight, height, etc.), and update their entries.

Users Schema

field data type metadata
id unsigned integer primary key, auto-increments, generated by database
username string required, unique
email string required, unique

Journal Schema

field data type metadata
id unsigned integer primary key, auto-increments, generated by database
user_id unsigned integer foreign key referencing id in Users table, generated by the database
workout string required
body_region string required
sets integer optional
weight string optional
reps integer optional
created_at string generated by the database
notes string optional

UserInfo Schema

field data type metadata
id unsigned integer primary key, auto-increments, generated by database
user_id unsigned integer foreign key referencing id in Users table, generated by the database
user_age integer required
user_height string required
user_weight string required
created_at string generated by the database

Endpoints

Base URL: https://weightliftingjournal1.herokuapp.com/api

Request Method Endpoint Description
POST /auth/login Logs a user in and returns a token
POST /auth/register creates a user
POST /users/:id/journal adds a journal entry for a given user :id references id for the user
POST /users/:id/info adds user information for a given user :id references id for the user
GET /users returns all users
GET /users/journals returns all journal entries for all users
GET /users/:id/journal returns all journal entries for a user
GET /users/usersinfo returns user information for all users
GET /users/:id/info returns user information for a given user
PUT /users/:id/entry updates a journal entry. :id refers to the entry id
PUT /users/:id/info updates user information. :id refers to the info id
Delete /users/:id/entry deletes a journal entry. :id refers to the entry id
Delete /users/:id/info deletes a users info entry. :id refers to the info id
Delete /users/:id/ deletes a user. :id refers to the users id

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors