hezarfen_backend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | //! The caller's own school, on the school side of the line. |
| 2 | //! |
| 3 | //! `GET /schools` is the vendor registry and answers only a builder cookie. |
| 4 | //! This route is the inverse: the school the session cookie is already bound |
| 5 | //! to, readable by every authenticated role. The uuid is the identity; nothing but the name is on the wire besides the uuid. |
| 6 | |
| 7 | use Json; |
| 8 | use Serialize; |
| 9 | use ToSchema; |
| 10 | use OpenApiRouter; |
| 11 | use routes; |
| 12 | |
| 13 | use crate; |
| 14 | use crateAppState; |
| 15 | use crate; |
| 16 | use crateCurrentUser; |
| 17 | use crateState; |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | /// The school behind the session cookie. `id` is the registry uuid — the |
| 24 | /// identity the database name and every structural reference mint from — and |
| 25 | /// `name` is the display name. Nothing but the uuid and the display name is published. |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | /// The school the session cookie is bound to: its uuid and display name. |
| 35 | /// |
| 36 | /// Any authenticated school user may read it, including a student or a parent. |
| 37 | /// A builder cookie names no school and is `401`, the same as on every other |
| 38 | /// school surface. |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | async |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 |