2023-09-23 15:56:21 +00:00
|
|
|
use rocket::{http::Status, serde::json::Json};
|
|
|
|
|
2023-09-23 16:03:29 +00:00
|
|
|
use super::json_result::JsonResult;
|
2023-09-23 15:56:21 +00:00
|
|
|
|
|
|
|
// Instead of requesting pages and managing session & cookies manually,
|
|
|
|
// create a wrapper that:
|
|
|
|
// - Checks if the session cookie is valid
|
|
|
|
// - If not, tries to login
|
|
|
|
// - Makes the request
|
|
|
|
// - Returns the html string, or an error
|
|
|
|
|
|
|
|
#[get("/classroom/users/<full_name>")]
|
|
|
|
pub async fn get_users(full_name: String) -> (Status, Json<JsonResult<()>>) {
|
|
|
|
(Status::Ok, JsonResult::ok(()))
|
|
|
|
}
|