mirror of
https://github.com/modrinth/code.git
synced 2026-09-05 06:19:11 +00:00
Add utoipa info for v2 routes (#5775)
* wip: add v2 docs, routes to config, paths * fix up path prefixes * fix leading slashes * fix slash route * fix more slashes * wip: full utopification of v2 * convert last few v2 routes to utoipa
This commit is contained in:
@@ -25,17 +25,17 @@ pub use self::not_found::not_found;
|
||||
|
||||
pub fn root_config(cfg: &mut web::ServiceConfig) {
|
||||
cfg.service(
|
||||
web::scope("maven")
|
||||
web::scope("/maven")
|
||||
.wrap(default_cors())
|
||||
.configure(maven::config),
|
||||
);
|
||||
cfg.service(
|
||||
web::scope("updates")
|
||||
web::scope("/updates")
|
||||
.wrap(default_cors())
|
||||
.configure(updates::config),
|
||||
);
|
||||
cfg.service(
|
||||
web::scope("analytics")
|
||||
web::scope("/analytics")
|
||||
.wrap(
|
||||
Cors::default()
|
||||
.allowed_origin_fn(|origin, _req_head| {
|
||||
@@ -59,7 +59,7 @@ pub fn root_config(cfg: &mut web::ServiceConfig) {
|
||||
.configure(analytics::config),
|
||||
);
|
||||
cfg.service(
|
||||
web::scope("api/v1")
|
||||
web::scope("/api/v1")
|
||||
.wrap(default_cors())
|
||||
.wrap_fn(|req, _srv| {
|
||||
async {
|
||||
|
||||
Reference in New Issue
Block a user