/api/users
POST
create user by specifyingemail
andpassword
in the request body- returns user credentials, a refresh token and an access token that is valid for an hour
PUT
update user credentials by specifying an access token in the request header
/api/login
POST
returns access token when specifying valid user credentials in the request body
/api/refresh
POST
return a new access token when specifying a valid refresh token
/api/revoke
POST
revokes a refresh token
/api/chirps
POST
create a post by specifying the text in the request body and a valid access token in the request headerGET
returns all postsGET /api/chirps/{chirpID}
returns a post by IDDELETE /api/chirps/{chirpID}
deletes an existing chirp by ID
/api/polka/webhooks
POST
update user to premium by specifying a valid apiKey in the request header and a valid userID in the request body
/admin/metrics
GET
shows all file server hits
/admin/reset
POST
clears database
- migrations done through goose by using either
migrateUp.sh
ormigrateDown.sh
- for database schema see
/sql/schema/
- queries generated by sqlc, see query definitions at
/sql/queries/