Paperclip/pkg/internal/server/api/index.go

18 lines
481 B
Go
Raw Normal View History

package api
import "github.com/gofiber/fiber/v2"
2024-07-16 09:02:16 +00:00
func MapAPIs(app *fiber.App, baseURL string) {
app.Get("/.well-known/destinations", getDestinations)
2024-07-16 09:02:16 +00:00
api := app.Group(baseURL).Name("API")
{
2024-07-25 14:02:26 +00:00
api.Get("/attachments", list)
api.Get("/attachments/:id/meta", getAttachmentMeta)
api.Get("/attachments/:id", openAttachment)
api.Post("/attachments", createAttachment)
api.Put("/attachments/:id", updateAttachmentMeta)
api.Delete("/attachments/:id", deleteAttachment)
}
}