- clone this project
git clone https://git.enigmacamp.com/enigma-camp/upskilling-class/01040726-upskilling-angular/final-task/be-timesheet-app/golang-timesheet.git
- copy the .example.env and make new file .env
cp .example.env .env
- update library
go mod tidy
- setting the env file
- optional (for new update please checkout development)
git checkout development
- run with
go run .
go-timesheet.postman_collection.json
- download file above
- import in postman
- open postman
- click import
- select the file above
- login [POST]
localhost:8080/api/v1/login
- register [POST]
localhost:8080/api/v1/admin/register
- create works [POST]
localhost:8080/api/v1/admin/works
- get works by id [GET]
localhost:8080/api/v1/admin/works/:id
- get all works [GET]
localhost:8080/api/v1/admin/works?paging=&rowsPerPage=
- update works [PUT]
localhost:8080/api/v1/admin/works/:id
- delete works [DELETE]
localhost:8080/api/v1/admin/works/:id
- change password [PUT]
localhost:8080/api/v1/accounts/change-password
- get detail profile [GET]
localhost:8080/api/v1/accounts/profile
- activate account [GET]
localhost:8080/api/v1/accounts/activate?e&unique
- upload-signature [POST]
localhost:8080/api/v1/accounts/profile/upload-signature
- update account [PUT]
localhost:8080/api/v1/accounts
- get all account [GET]
localhost:8080/api/v1/admin/accounts
- detail admin account [GET]
localhost:8080/api/v1/admin/accounts/detail/:id
- get all roles [GET]
localhost:8080/api/v1/admin/roles
- delete account [DELETE]
localhost:8080/api/v1/admin/accounts/delete/:id
- create timesheet [POST]
localhost:8080/api/v1/timesheets
- get all timesheet [GET]
localhost:8080/api/v1/timesheets?period=&userId=&status=
- update timesheet [PUT]
localhost:8080/api/v1/timesheets/:id
- get timesheet by id [GET]
localhost:8080/api/v1/timesheets/:id
- approved by manager [POST]
localhost:8080/api/v1/manager/approve/timesheets/:id
- rejected by manager [POST]
localhost:8080/api/v1/manager/reject/timesheets/:id
- approved by benefit [POST]
localhost:8080/api/v1/benefit/reject/timesheets/:id
- rejected by benefit [POST]
localhost:8080/api/v1/benefit/reject/timesheets/:id