Skip to content

Latest commit

 

History

History
107 lines (81 loc) · 1.97 KB

README.md

File metadata and controls

107 lines (81 loc) · 1.97 KB

Chami-Be

A brief description of what this project does and who it's for

Tech Stack

Client: Android

Server: Node, Express, Firestore, Mysql, json web token

Installation

clone this repo and run the following command

  cd chami-be
  npm install  

Running Tests

To run test, run the following command

  npm start

API Reference

Register Users

 POST /api/v1/register
Parameter Type Description
id_pegawai string input id pegawai.
name string input nama.
password string input password.
password2 string input password2.
email string input email.
posisi string input posisi.
divisi string input divisi.
  • Response Jika Berhasil
{
    "message": "berhasil",
    "status": true,
    "data": {
        "id_pegawai": "blabla",
        "name": "test",
        "password": "1234567",
        "password2": "1234567",
        "email": "[email protected]",
        "posisi": "Agent",
        "divisi": "Digital Center"
    }
}

Login Users

  GET /api/v1/login
Parameter Type Description
id_pegawai string input id pegawai.
password string input password.
  • Response Jika Gagal Login
{
    "message": "Id Pagawai atau Password Salah!"
}
  • Response Jika Berhasil Login
{
    "message": "selamat Datang",
    "status": true,
    "token": "secret-auth-token",
    "data": {}
}

Update Users

  POST /api/v1/profile
  • Request header
    • token
    • id
Parameter Type Description
id_pegawai string input id pegawai.
name string input name.