Add first routes for accounts management

This commit is contained in:
2025-04-03 23:14:55 +02:00
parent 03f57a0ad7
commit 72e67d9e91
14 changed files with 202 additions and 43 deletions

View File

@ -100,6 +100,19 @@ async fn main() -> std::io::Result<()> {
"/api/tokens/{id}",
web::delete().to(tokens_controller::delete),
)
// Accounts controller
.route("/api/accounts", web::post().to(accounts_controller::create))
.route(
"/api/accounts/list",
web::get().to(accounts_controller::get_list),
)
// TODO : update account
//TODO
/*.route(
"/api/accounts/{id}",
web::delete().to(accounts_controller::delete),
)*/
// TODO : set as default
// Static assets
.route("/", web::get().to(static_controller::root_index))
.route(