* Fixing /invites/join as it was returning the wrong struct data 🤦

Secret value given to user was literally the encrypted secret because I forgot
to rebind it

- removing dev key lmaoooo
These are generated super easily and this key doesn't actually go to anything
so its really not a problem, although it is annoying that its there
This commit is contained in:
shockrah 2021-04-25 12:40:08 -07:00
parent e2e68c51ba
commit 90b584eaa2
2 changed files with 6 additions and 5 deletions

View File

@ -1,2 +0,0 @@
bïò<EFBFBD>Cˆ'BIŸ¬%©b»jˆ]<>Ž¥µH>ŒŒ$ ° æúϦwÙY攘#ÂýÐ
4O¶>'ŸÉ“

View File

@ -68,9 +68,12 @@ async fn use_invite(pool: &Pool, code: Option<BigInt>) -> Option<Member>{
let raw_secret = auth::generate_secret();
let secret = auth::encrypt_secret(&raw_secret).unwrap();
return match Member::add(pool, "Anonymous".into(), &secret, GENERAL_NEW).await {
Ok(response) => {
match response {
db::Response::Row(member) => Some(member),
Ok(dbresponse) => {
match dbresponse {
db::Response::Row(mut member) => {
member.secret = raw_secret;
Some(member)
}
_ => None
}
},