Skip to main content

args_api/endpoint/auth/device/
authorize_device.rs

1use serde::{Deserialize, Serialize};
2
3use crate::endpoint::Endpoint;
4
5pub struct AuthorizeDevice;
6
7impl Endpoint for AuthorizeDevice {
8    const PATH: &'static str = "/auth/device/authorize";
9    const METHOD: http::Method = http::Method::POST;
10
11    type Request = AuthorizeDeviceRequest;
12    type Response = ();
13}
14
15#[derive(ApiRequest, Debug, Serialize, Deserialize)]
16pub struct AuthorizeDeviceRequest {
17    pub user_code: String,
18}