- Create a database ada-api in your Postgres local instance
- Rename
.env.exmaple
to.env
. - Add in the database user and password for your postgres instance containing the database ada-api.
- In the root folder run
go run main.go
. - Get the API docs at http://localhost:3000/swagger/index.html
-
/api/student
- / [GET] returns all students
- /:school_id [GET] returns a specific student
- / [POST] creates a new student
- /:school_id [PUT] updates the student data
- /:school_id [DELETE] deletes the specified student
-
/api/instructor
- / [GET] returns all instructors
- /:school_id [GET] returns a specific instructor
- / [POST] creates a new instructor
- /:school_id [PUT] updates the instructor data
- /:school_id [DELETE] deletes the specified instructor
-
/api/building
- / [GET] returns all buildings
- /:name [GET] returns a specific building
- / [POST] creates a new building
- /:name [PUT] updates the building data
- /:name [DELETE] deletes the specified building
-
/api/room
- / [GET] returns all rooms
- /:building_name [GET] returns all rooms on a specified building_name
- /:name [GET] returns a specific room
- / [POST] creates a new room
- /:name [PUT] updates the room data
- /:name [DELETE] deletes the specified room
-
/api/key
- /:bulding_name [GET] get all keys in a building
- / [POST] creates a new key
- /:rfid [PUT] updates a key
- /:rfid [DELETE] deletes a key
-
/api/record
- / [GET] get all records
- / [POST] creates a new record
- should also update the key status
-
implement a limit or range of records
-
fix /api/room/:name [GET] endpoint
-
create unit tests for all handlers