🚚 Move api path
This commit is contained in:
parent
33d6766f95
commit
83df95435c
@ -2,10 +2,10 @@ package api
|
||||
|
||||
import "github.com/gofiber/fiber/v2"
|
||||
|
||||
func MapAPIs(app *fiber.App) {
|
||||
func MapAPIs(app *fiber.App, baseURL string) {
|
||||
app.Get("/.well-known/destinations", getDestinations)
|
||||
|
||||
api := app.Group("/api").Name("API")
|
||||
api := app.Group(baseURL).Name("API")
|
||||
{
|
||||
api.Get("/attachments/:id/meta", getAttachmentMeta)
|
||||
api.Get("/attachments/:id", openAttachment)
|
||||
|
@ -1,10 +1,11 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"git.solsynth.dev/hydrogen/paperclip/pkg/internal/gap"
|
||||
"git.solsynth.dev/hydrogen/paperclip/pkg/internal/server/api"
|
||||
"git.solsynth.dev/hydrogen/paperclip/pkg/internal/server/exts"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/cors"
|
||||
@ -55,7 +56,7 @@ func NewServer() {
|
||||
A.Use(gap.H.AuthMiddleware)
|
||||
A.Use(exts.LinkAccountMiddleware)
|
||||
|
||||
api.MapAPIs(A)
|
||||
api.MapAPIs(A, "/")
|
||||
}
|
||||
|
||||
func Listen() {
|
||||
|
Loading…
Reference in New Issue
Block a user