Skip to main content

args_api/endpoint/user/
get_current_user.rs

1use serde::{Deserialize, Serialize};
2
3use crate::{endpoint::Endpoint, resource::user::CurrentUserResource};
4
5pub struct GetCurrentUser;
6
7impl Endpoint for GetCurrentUser {
8    const PATH: &'static str = "/user";
9    const METHOD: http::Method = http::Method::GET;
10
11    type Request = GetCurrentUserRequest;
12    type Response = GetCurrentUserResponse;
13}
14
15#[derive(ApiRequest, Debug, Serialize, Deserialize)]
16pub struct GetCurrentUserRequest {}
17
18pub type GetCurrentUserResponse = CurrentUserResource;