🐛 Fix API mapping issue
This commit is contained in:
parent
659fc8375c
commit
133bbcc6bc
@ -4,7 +4,7 @@
|
|||||||
<option name="autoReloadType" value="ALL" />
|
<option name="autoReloadType" value="ALL" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":sparkles: Admin notify all API" />
|
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix request body validation" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@ -149,7 +149,6 @@
|
|||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value=":sparkles: Better avatar and banner APIs" />
|
|
||||||
<MESSAGE value=":bug: Fix avatar and banner APIs" />
|
<MESSAGE value=":bug: Fix avatar and banner APIs" />
|
||||||
<MESSAGE value=":bug: Fix frontend" />
|
<MESSAGE value=":bug: Fix frontend" />
|
||||||
<MESSAGE value=":card_file_box: Add the status model" />
|
<MESSAGE value=":card_file_box: Add the status model" />
|
||||||
@ -174,7 +173,8 @@
|
|||||||
<MESSAGE value=":bug: Fix status query condition" />
|
<MESSAGE value=":bug: Fix status query condition" />
|
||||||
<MESSAGE value=":bug: Fix disturbable condition" />
|
<MESSAGE value=":bug: Fix disturbable condition" />
|
||||||
<MESSAGE value=":sparkles: Admin notify all API" />
|
<MESSAGE value=":sparkles: Admin notify all API" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value=":sparkles: Admin notify all API" />
|
<MESSAGE value=":bug: Fix request body validation" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix request body validation" />
|
||||||
</component>
|
</component>
|
||||||
<component name="VgoProject">
|
<component name="VgoProject">
|
||||||
<settings-migrated>true</settings-migrated>
|
<settings-migrated>true</settings-migrated>
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
func MapAdminEndpoints(app *fiber.App) {
|
func MapAdminAPIs(app *fiber.App) {
|
||||||
admin := app.Group("/api/admin")
|
admin := app.Group("/api/admin")
|
||||||
{
|
{
|
||||||
admin.Post("/badges", grantBadge)
|
admin.Post("/badges", grantBadge)
|
||||||
|
@ -61,8 +61,8 @@ func NewServer() *HTTPApp {
|
|||||||
app.Use(exts.AuthMiddleware)
|
app.Use(exts.AuthMiddleware)
|
||||||
app.Use(i18n.I18nMiddleware)
|
app.Use(i18n.I18nMiddleware)
|
||||||
|
|
||||||
|
admin.MapAdminAPIs(app)
|
||||||
api.MapAPIs(app)
|
api.MapAPIs(app)
|
||||||
admin.MapAdminEndpoints(app)
|
|
||||||
|
|
||||||
app.Use(filesystem.New(filesystem.Config{
|
app.Use(filesystem.New(filesystem.Config{
|
||||||
Root: http.Dir(viper.GetString("frontend_app")),
|
Root: http.Dir(viper.GetString("frontend_app")),
|
||||||
|
Loading…
Reference in New Issue
Block a user