hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import type { Builder } from "../client"; |
| 3 | |
| 4 | export type BuilderLoginBody = { |
| 5 | username: string; |
| 6 | password: string; |
| 7 | }; |
| 8 | |
| 9 | // Sets a `builder.`-prefixed session cookie, which replaces any school session |
| 10 | // in this browser: the two are mutually exclusive (each is 401 on the other side). |
| 11 | export function postBuilderLogin(body: BuilderLoginBody): Promise<Builder> { |
| 12 | return client<Builder>("/builder/login", { method: "POST", body }); |
| 13 | } |