Fix issue

This commit is contained in:
Ethan O'Brien
2026-09-16 22:17:31 -05:00
parent 844a8f381b
commit 2fe5ecd53e
+5 -3
View File
@@ -195,9 +195,11 @@ pub async fn announcement(Login(key): Login) -> impl Responder {
})) }))
} }
async fn get_migration_code(Body(body): Body) -> impl Responder { async fn get_migration_code(Session { key, .. }: Session) -> impl Responder {
let user_id = userdata::uid_from_login_token(&key);
let Some(user_id) = body["user_id"].as_i64() else { return Api(None); }; if user_id == 0 {
return Api(None);
}
let code = userdata::user::migration::get_acc_token(user_id); let code = userdata::user::migration::get_acc_token(user_id);
Api(Some(object!{ Api(Some(object!{