chore: pc change

This commit is contained in:
alphafetus committed 2025-08-26 09:57:58 -04:00
1 parent 21ba5e45ff
commit f7ca1ecbc5
27 files changed
+926 -262

No files matched your search

+6 -9
View File
@@ -1,15 +1,14 @@
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize)]
struct FormDefinition {
sections: Vec<Section>
sections: Vec<Section>,
}
#[derive(Serialize, Deserialize)]
struct Section {
questions: Vec<QuestionType>
questions: Vec<QuestionType>,
}
#[derive(Serialize, Deserialize)]
@@ -20,12 +19,10 @@ enum QuestionType {
Dropdown,
Checkbox,
Radio,
Multi
Multi,
}
struct TextInput {
}
struct TextInput {}
#[derive(Serialize, Deserialize)]
struct QuestionComponent {
@@ -34,5 +31,5 @@ struct QuestionComponent {
placeholder: Option<String>,
// Used in <select> and <checkbox> elements
options: Option<HashMap<String, String>>
options: Option<HashMap<String, String>>,
}
+2 -3
View File
@@ -1,10 +1,9 @@
#[derive(Clone)]
pub struct LoanerUser {
pub first_name: String,
pub last_name: String,
pub email: String,
pub has_loan: bool
pub has_loan: bool,
}
impl LoanerUser {
@@ -13,7 +12,7 @@ impl LoanerUser {
first_name: "".to_string(),
last_name: "".to_string(),
email: "".to_string(),
has_loan: false
has_loan: false,
}
}
}
+4 -6
View File
@@ -1,8 +1,6 @@
mod loaner_user;
mod student_info;
mod form_definition;
mod loaner_user;
mod student_info;
mod user;
pub use self::{
loaner_user::*,
student_info::*
};
pub use self::{loaner_user::*, student_info::*, user::*};
+4 -2
View File
@@ -1,7 +1,9 @@
use serde::{Deserialize, Serialize};
use macros::Reactive;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone)]
#[derive(Serialize, Deserialize, Debug, Clone, Reactive)]
pub struct StudentInfo {
pub first_name: String,
pub last_name: String,
pub math_sat_score: i32,
}
+25
View File
@@ -0,0 +1,25 @@
use serde::{Deserialize, Serialize};
// API URL to get user information from Google's Groups API:
// https://admin.googleapis.com/admin/directory/v1/groups?domain=region15.org&userKey=<email>
// Note that this requires a service account of some type, and that it should only be called from
// a pre-sign up lambda function.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UserClaims {
/// The time the JWT was issued, in UTC time.
#[serde(rename = "iat")]
issued_at: usize,
/// The issuer of the JWT.
#[serde(rename = "iss")]
issuer: String,
/// The time the JWT expires, in UTC time.
#[serde(rename = "exp")]
expiration_at: usize,
/// The subject of the JWT. This is the only unique identifier for a user.
#[serde(rename = "sub")]
pub subject: String,
/// The username of the user. This should be their email address.
#[serde(rename = "username")]
pub username: String,
}