git clone https://github.com/olvrb/typescript-express-boilerplate
cd typescript-express-boilerplate
mv src/Config.example.ts src/Config.ts
yarn -D
yarn dev
Create a booking. Redirects to /user/bookings if success.
seat
: The set ID for seatsio to reserve.
Content-Type: application/json
{
"seat": "A-1-3"
}
Mark a booking as paid. Redirects to /admin/bookings if success.
-
booking
: The booking ID. -
reason
: Reason for marking the booking as paid, e.g: Swish transaction Id.
Content-Type: application/json
{
"booking": "uid",
"reason": "123456789"
}
Remove a booking. Redirects to /user/bookings if success.
booking
: The booking ID.
Content-Type: application/json
{
"booking": "uid"
}
Login with email and password. Redirects to /book if success, else to /auth/login?loginError
.
email
: Email.password
: Password.
Content-Type: application/json
{
"email": "[email protected]",
"password": "123456789"
}
Sign out. Redirects to /auth/login.
Sign up as a new user. Redirects to /auth/login.
email
: Email.password
: PasswordnationalId
: National ID/SSN/Personnummer in formatYYMMDD-XXXX
name
: Name.surname
: Surname.phone
: Phone number in format0712345678
adultPhone
: Adult phone number.address
: Address.postcode
: Postcode.city
: City.
Content-Type: application/json
{
"email": "[email protected]",
"password": "123456789",
"nationalId": "970425-XXXX",
"name": "John",
"surname": "Doe",
"phone": "0712345678",
"adultPhone": "0712345678",
"address": "Hantverkargatan 1",
"postcode": "11266",
"city": "Stockholm"
}