This repository contains the backend for SLIET's techFEST 2024 and further up.
Pre-requisites
- rust with cargo
To run,
cargo run
To build a release server,
cargo build --release
This document provides a detailed overview of the routes defined in the routes.rs
file, along with the associated data structures from all provided files.
This was generated by claude, i couldn't be bothered with writing docs
/auth/sign_in
(POST)- Data:
SignInForm
(email: String, password: String)
- Data:
/auth/student/sign_up
(POST)- Data:
StudentSignUp
(name, dob, email, phone, role, password, college, reg_no, dept)
- Data:
/auth/faculty/sign_up
(POST)- Data:
FacultySignUp
(name, dob, email, phone, role, password, title, dept)
- Data:
/auth/verify
(GET)- Query:
VerificationQuery
(id: i32, token: u64)
- Query:
/profile
(GET)- Response:
Profile
(id, dob, name, email, phone, role, verified)
- Response:
/profile
(PATCH)- Data:
ChangeProfile
(dob, name, email, phone - all optional)
- Data:
/profile/photo
(GET)- Query:
GetProfilePhoto
(id: i32)
- Query:
/profile/photo
(POST)- Data: Not specified in the given structs
/profile/requests
(GET)- Response: Not specified in the given structs
/domain
(GET)- Response: Not specified in the given structs
/domain
(POST)- Data:
CreateDomain
(name: String, description: String)
- Data:
/domain
(DELETE)- Data:
DeleteDomain
(id: i32)
- Data:
/domain
(PATCH)- Data:
ChangeDomain
(id: i32, name: Option, description: Option)
- Data:
/domain/coordinator/faculty
(GET)- Query:
GetDomainFacultyCoordinator
(id: i32)
- Query:
/domain/coordinator/faculty
(POST)- Data:
AddDomainFacultyCoordinator
(faculty_id: i32, domain_id: i32)
- Data:
/domain/coordinator/student
(GET)- Query:
GetDomainStudentCoordinator
(id: i32)
- Query:
/domain/coordinator/student
(POST)- Data:
AddDomainStudentCoordinator
(student_id: i32, domain_id: i32)
- Data:
/domain/photo
(GET)- Query:
GetDomainPhoto
(id: i32)
- Query:
/domain/photo
(POST)- Data: Not specified in the given structs
/event
(GET)- Query:
EventId
(id: i32)
- Query:
/event
(POST)- Data:
CreateEvent
(name, description, mode, venue, domain_id, prize, points, ps_link, start_time, end_time, registration_start, registration_end, whatsapp_link)
- Data:
/event
(DELETE)- Data:
DeleteEvent
(id: i32)
- Data:
/event
(PATCH)- Data:
ChangeEvent
(id, name, description, mode, venue, prize, points, ps_link, start_time, end_time, registration_start, registration_end, whatsapp_link - all optional except id)
- Data:
/event/coordinator
(GET)- Query:
GetEventStudentCoordinator
(id: i32)
- Query:
/event/coordinator
(POST)- Data:
AddEventStudentCoordinator
(student_id: i32, event_id: i32)
- Data:
/event/attendance/individual
(GET, POST, DELETE)- Data:
EventIndividualAttendance
(user_id: i32, event_id: i32)
- Data:
/event/attendance/team
(GET, POST, DELETE)- Data:
EventTeamAttendance
(team_id: i32, event_id: i32)
- Data:
/event/photo
(GET, POST)- Data: Not specified in the given structs
/event/join/individual
(POST)- Data: Not specified in the given structs
/event/join/team
(POST)- Data: Not specified in the given structs
/workshop
(GET)- Query:
WorkshopId
(id: i32)
- Query:
/workshop
(POST)- Data:
CreateWorkshop
(name, description, mode, venue, domain_id, points, ps_link, start_time, end_time, registration_start, registration_end, whatsapp_link)
- Data:
/workshop
(DELETE)- Data:
DeleteWorkshop
(id: i32)
- Data:
/workshop
(PATCH)- Data:
ChangeWorkshop
(id, name, description, mode, venue, ps_link, start_time, end_time, registration_start, registration_end, whatsapp_link - all optional except id)
- Data:
/workshop/coordinator
(GET)- Query:
GetWorkshopStudentCoordinator
(id: i32)
- Query:
/workshop/coordinator
(POST)- Data:
AddWorkshopStudentCoordinator
(student_id: i32, workshop_id: i32)
- Data:
/workshop/photo
(GET, POST)- Data: Not specified in the given structs
/workshop/join
(POST)- Data: Not specified in the given structs
/workshop/attendance
(GET, POST)- Data:
WorkshopIndividualAttendance
(user_id: i32, workshop_id: i32)
- Data:
/team
(GET)- Query:
TeamId
(id: i32)
- Query:
/team
(POST)- Data:
TeamName
(name: String)
- Data:
/team
(DELETE)- Data:
TeamId
(id: i32)
- Data:
/team
(PATCH)- Data:
ChangeTeam
(id: i32, name: Option)
- Data:
/team/member
(GET, DELETE)- Data:
MemberId
(team_id: i32, student_id: i32)
- Data:
/team/request
(GET, POST, PUT)- Data: Not specified in the given structs
Note: For some routes, the exact data structures are not provided in the given struct definitions. These are marked as "Not specified in the given structs" or "Data: Not provided in the given structs".