Skip to content

This is the server-side repo of our FREED App, which we have API endpoints to access the server.

Notifications You must be signed in to change notification settings

Developers-Community-OPJU/freed-app-api

Repository files navigation

FREED APP - SERVER API

BASE_URL = "https://dco-leave-app-api.herokuapp.com/" (temporary deployment)

RECORDS ENDPOINTS

  • ✅ - [get] - api/records/ - list all the records

  • ✅ - [get] - api/records/:id - get particular record

  • ✅ - [get] - api/records/id/:studentId' - get all records of the student

  • ✅ - [get] - api/records/:id/:studentId - get particular record of the student

  • ✅ - [post] - api/records/new - request new leave

  • ✅ - [delete] - api/records/:id - cancel request

  • ✅ - [put] - api/records/:id?status=['ACCEPTED',"DECLINED"] - permit update action for admin

  • ✅ - [post] - api/records/:id/remark - add remark body : { msg : "decline msg goes here", by : id of the admin user} x

  • ✅ - [post] - /api/records/approval-request body : { "recordId" : "61463ded06af3a0ab4522525", "wardenId" : "6143882dd3a99860494961df" }

  • ✅ - [post] - /api/records/approval-decline body : { "recordId" : "61463ded06af3a0ab4522525", "adminId" : "6143882dd3a99860494961df", remark : "" }

  • ✅ - [post] - /api/records/approval-accept body : { "recordId" : "61463ded06af3a0ab4522525", "adminId" : "6143882dd3a99860494961df" }

PROFILE

  • ✅ - [post] - api/student/update - update student profile send req body as as follows -

note make sure validate for each key not to be empty overwrite values are allowed.

{ "_id": "60d42f8c83052434089e7672", "firstName": "", "lastName": "", "email" : "[email protected]", "course": "B.Tech", "semester": 6, "branch": "CSE" }

AUTH - student

  • ✅ - [post] - api/auth/register/student
  • ✅ - [post] - api/auth/login/student
  • ✅ - [post] - api/auth/spread_token send token in headers as - [x-leave-auth-token] : token_value

AUTH - admin

  • ✅ - [post] - api/auth/admin/register
  • ✅ - [post] - api/auth/admin/login
  • ✅ - [post] - api/auth/admin/spread_token send token in headers as - [x-admin-auth-token] : "pass token here"

ADMIN ROUTES

  • ✅ - [get] - api/admin/list - get all admin users
  • ✅ - [put] - api/records/:id?status=['ACCEPTED',"DECLINED"] - permit update * action
  • ✅ - [get] - /api/admin/fetch/:adminId

GATEWAY - CHECKIN-CHECKOUT ROUTES

  • ✅ - [get] - /api/gateway/checklist - list all the checklist
  • ✅ - [post] - /api/gateway/checkout - perform checkin and checkout { "student" : "60eb41009f076b0004abe4a4" }

ADMIN

  • [] get notified for new leave
  • [] list all the leaves
  • [] perform action on the leave

limited records / sem or / year no new leave record untill previous records are finalized

NOTIFICATION CLIENT CONNECTION

  • emit - > 'join' and pass { id of the student } : Connect to server
  • on - > 'msg to student' : listen for any noitification from admin

NOTIFICATION GATE APP CONNECTION

  • emit - > 'msg from admin' and pass { id, name of the student } : send notification to the student

tasks

  • proper on boarding-process
  • profile
  • improove ui feedback
  • Record Model : studentid - > student
  • Record Model : removed the "remark_by_hod" field

TODAYS TASK [x]- CONFIRM DIALOG [x] CONNECTION TO THE APPROVAL API

[x]- DECLINE AND ADD REMARK BY HOD - API [x]- ACCEPT APPROVAL BY HOD - API

  • routes changes from request-approval -> approval-request

COMPLETE THE APPROVAL MODULE - Co OFunder DC - Roshan Nahak [ The Android Master ] - Noogler

Postman Invite Link https://app.getpostman.com/join-team?invite_code=2c4666921c3c07107c5c1f4c76b2ced2&ws=c04e2867-6528-4a13-89c0-57172b0be678

[] add auth check middleware [ student , admin ] [] manual leave entry by admin

About

This is the server-side repo of our FREED App, which we have API endpoints to access the server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published