From cf314e2d96ce3f5e7cebaca6f33fa8ba373ccb2b Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 27 Dec 2020 12:32:01 +0530 Subject: add userprofile endpoint, fix cors (again?) --- backend/src/bin/server.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backend/src/bin') diff --git a/backend/src/bin/server.rs b/backend/src/bin/server.rs index 310914e..135dccc 100644 --- a/backend/src/bin/server.rs +++ b/backend/src/bin/server.rs @@ -34,6 +34,7 @@ async fn main() -> std::io::Result<()> { Cors::default() .allowed_origin("http://127.0.0.1:8000") .allowed_origin("http://localhost:8000") + .allowed_origin("https://poly.googleusercontent.com") .allow_any_method() .allow_any_header(), ) @@ -46,6 +47,7 @@ async fn main() -> std::io::Result<()> { .data(pool.clone()) .service( web::scope("/user") + .route("/profile", web::get().to(users::user_profile)) .route("/existing", web::post().to(users::name_exists)) .route("/login", web::post().to(users::login)) .route("/logout", web::post().to(users::logout)) -- cgit v1.2.3