Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

kir-dev/sssl_registrations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SSSL Reg

This is a quick registration website for SSSL

TODO

Copy frontend from cmsch project

api documentation

There is only one api endpoint, where you can post form data. Here is an example interface:

export interface RegistrationFormDTO{
    name:string; // név
    email:string; //mail
    nickname:string; // becenév
    tel: string; // telefon
    year: number; // évfolyam
    university: string; // Egyetem
    group: string; // Gárda
    room_number: number; // szobaszám
    other?: string //egyéb megjegyzés
    schedule: { //mikor ér rá
        monday?: boolean;
        tuesday? :boolean;
        wednesday?: boolean;
        thursday?: boolean;
    }
    eula?: boolean; //elfogadja a feltételeket
}

And an example api call

const api = 'https://sssl-staging.herokuapp.com/api'

const form_response: RegistrationFormDTO = {
    "name": "Teszt Elek",
    "nickname": "Telek",
    "email": "asd@asd.com",
    "tel": "063332525",
    "year":3,
    "university": "BME",
    "group": "White",
    "room_number": 1319,
    "other": "",
    
    "schedule": {
        "monday": true,
        "tuesday":true
        // ha kihagyod a napot az implicit false értékű lesz backenden
    }
}

axios.post<RegistrationFormDTO>(`${api}/registrations.json`,form_response).then(res => {
    console.log(res.data) // response is the same DTO and status code 201
})
.catch(err =>{
    //rossz form adatok esetén 422
    const response = err.response
    console.log(response.statusCode) //422
    
    console.log(response.data) // egy json a következő formában { <hibás property neve>: ["hibaüzenet1", "hibaüzenet2"], <másik hibás property>   }

    //pl { eula: [ "must be accepted" ] }
    
})

About

A quick website for first year students to register to SSSL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors