mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-02-26 00:31:00 +01:00
templates: Add a template for web applications
This commit is contained in:
parent
47094c899f
commit
e380eff9b5
12 changed files with 328 additions and 0 deletions
12
templates/webapp/api/src/lib.rs
Normal file
12
templates/webapp/api/src/lib.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct LoginRequest {
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct LoginResponse {
|
||||
pub token: String,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue