🔨 change path

This commit is contained in:
微凉
2021-10-28 12:37:31 +08:00
parent 55f683b12d
commit 98f7dffed9
5 changed files with 51 additions and 26 deletions

View File

@ -1,15 +1,20 @@
package server
import "github.com/gofiber/fiber/v2"
import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
)
func InitApiRouter(app *fiber.App) {
// TODO from settings
app.Use(cors.New())
app.Get("/d/*", Down)
public := app.Group("/api/public")
{
// TODO check accounts
public.Post("/path", Path)
public.Post("/path", CheckAccount, Path)
public.Get("/settings", GetSettingsPublic)
}