m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-18 01:43:41 -05:00

Change API versioning to match Cup version

This commit is contained in:
Sergio
2024-12-07 16:30:07 +02:00
parent e5e60c4abc
commit f6ac43aac0
3 changed files with 7 additions and 6 deletions

View File

@@ -39,9 +39,10 @@ pub async fn serve(port: &u16, config: &Config) -> std::io::Result<()> {
App::new()
.with_state(Arc::new(Mutex::new(data)))
.at("/", get(handler_service(_static)))
.at("/api/v1/simple", get(handler_service(api_simple)))
.at("/api/v1/full", get(handler_service(api_full)))
.at("/api/v1/json", get(handler_service(api_simple)))
.at("/api/v3/json", get(handler_service(api_full)))
.at("/api/v1/refresh", get(handler_service(refresh)))
.at("/api/v3/refresh", get(handler_service(refresh)))
.at("/*", get(handler_service(_static)))
.enclosed(Logger::new())
.serve()