Updated queries/endpoints, made admin page

This commit is contained in:
2023-11-20 16:48:20 -05:00
parent 319f64bc16
commit d45ed73eed
22 changed files with 735 additions and 127 deletions

View File

@@ -4,7 +4,6 @@ use crate::auth::{JwtAuth, QueryUser, InsertUser};
#[get("users/favorites")]
async fn get_favorites(auth: JwtAuth) -> HttpResponse {
println!("{:?}", auth);
match QueryUser::get_by_email(&auth.user.email) {
Ok(user) => {
return HttpResponse::Ok().json(user.favorites)