api : add api users

This commit is contained in:
lukman
2024-07-29 10:45:10 +08:00
parent ea7a2ba98c
commit 1a80ed184c
8 changed files with 173 additions and 31 deletions

View File

@@ -118,4 +118,49 @@ Content-Type: application/json
// USERS
###
GET http://localhost:3000/api/user/get?path=get-all-users&roleID=dev&positionID=null&villageID=null&groupID=null HTTP/1.1
GET http://localhost:3000/api/user/get?path=get-all-users&roleID=dev&villageID=121212&groupID=2&positionID=clz24bff70001w01in64dd9ea HTTP/1.1
###
GET http://localhost:3000/api/user/get?path=get-one-users&userID=devAmalia HTTP/1.1
###
POST http://localhost:3000/api/user/post?path=create-users HTTP/1.1
Content-Type: application/json
{
"idUserRole": "user",
"idVillage": "121212",
"idGroup": "2",
"idPosition": "clz24bff70001w01in64dd9ea",
"nik": "53239236727329",
"name": "coba user",
"email": "cobauser@gmail.com",
"phone": "07319031009",
"gender": "M"
}
###
POST http://localhost:3000/api/user/post?path=update-users HTTP/1.1
Content-Type: application/json
{
"id": "clz6dq88e0001b3mlyl4vjaf8",
"idUserRole": "user",
"idVillage": "121212",
"idGroup": "2",
"idPosition": "clz24bff70001w01in64dd9ea",
"nik": "53239236727329",
"name": "coba user edit",
"email": "cobauser@gmail.com",
"phone": "07319031009",
"gender": "M"
}
###
POST http://localhost:3000/api/user/post?path=delete-users HTTP/1.1
Content-Type: application/json
{
"id": "clz6dq88e0001b3mlyl4vjaf8"
}