shared/api/endpoints/user/
fonts.rs1use super::ApiEndpoint;
2
3use crate::{
4 api::method::Method,
5 domain::user::{
6 UserFontCreatePath, UserFontDeletePath, UserFontGetPath, UserFontNameRequest,
7 UserFontResponse, UserFontUpdatePath,
8 },
9 error::EmptyError,
10};
11
12pub struct Create;
16impl ApiEndpoint for Create {
17 type Req = UserFontNameRequest;
18 type Res = UserFontResponse;
19 type Path = UserFontCreatePath;
20 type Err = EmptyError;
21 const METHOD: Method = Method::Post;
22}
23
24pub struct Get;
26impl ApiEndpoint for Get {
27 type Req = ();
28 type Res = UserFontResponse;
29 type Path = UserFontGetPath;
30 type Err = EmptyError;
31 const METHOD: Method = Method::Get;
32}
33
34pub struct Update;
36impl ApiEndpoint for Update {
37 type Req = UserFontNameRequest;
38 type Res = ();
39 type Path = UserFontUpdatePath;
40 type Err = EmptyError;
41 const METHOD: Method = Method::Patch;
42}
43
44pub struct Delete;
46impl ApiEndpoint for Delete {
47 type Req = ();
48 type Res = ();
49 type Path = UserFontDeletePath;
50 type Err = EmptyError;
51 const METHOD: Method = Method::Delete;
52}