this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Laying type groundwork

+26 -1
+19
client/src/lumina_client.gleam
··· 750 750 751 751 type WsMsg { 752 752 Greeting(greeting: String) 753 + RegisterPrecheck( 754 + email: String, 755 + username: String, 756 + // Password only once? Yes, the equal password check is done in the view. 757 + password: String, 758 + ) 753 759 RegisterRequest(email: String, username: String, password: String) 754 760 LoginAuthenticationRequest(email_username: String, password: String) 755 761 Undecodable ··· 770 776 #("username", json.string(username)), 771 777 #("password", json.string(password)), 772 778 ]) 779 + RegisterPrecheck(email, username, password) -> 780 + json.object([ 781 + #("type", json.string("register_precheck")), 782 + #("email", json.string(email)), 783 + #("username", json.string(username)), 784 + #("password", json.string(password)), 785 + ]) 773 786 Greeting(_) | Undecodable -> 774 787 json.object([#("type", json.string("unknown"))]) 775 788 } ··· 788 801 use username <- decode.field("username", decode.string) 789 802 use password <- decode.field("password", decode.string) 790 803 decode.success(RegisterRequest(email, username, password)) 804 + } 805 + "register_precheck" -> { 806 + use email <- decode.field("email", decode.string) 807 + use username <- decode.field("username", decode.string) 808 + use password <- decode.field("password", decode.string) 809 + decode.success(RegisterPrecheck(email, username, password)) 791 810 } 792 811 "greeting" -> { 793 812 use greeting <- decode.field("greeting", decode.string)
+7 -1
server/src/client_communication.rs
··· 142 142 } 143 143 Ok(jsonmsg) => { 144 144 let _ = stream.send(ws::Message::from("unknown")).await; 145 - todo!("Handle message: {:?}", jsonmsg); 145 + panic!("Unhandled message: {:?}", jsonmsg); 146 146 } 147 147 Err(e) => { 148 148 error!("Error deserialising message: {:?}", e); ··· 188 188 username: String, 189 189 password: String, 190 190 }, 191 + #[serde(rename = "register_precheck")] 192 + RegisterPrecheck { 193 + email: String, 194 + username: String, 195 + password: String, 196 + }, 191 197 #[serde(rename = "auth_success")] 192 198 AuthSuccess { token: String, username: String }, 193 199 #[serde(rename = "auth_failure")]