2024-06-22 04:29:20 +00:00
|
|
|
package api
|
|
|
|
|
|
|
|
import "github.com/gofiber/fiber/v2"
|
|
|
|
|
2024-07-16 09:02:16 +00:00
|
|
|
func MapAPIs(app *fiber.App, baseURL string) {
|
2024-06-22 04:29:20 +00:00
|
|
|
app.Get("/.well-known/destinations", getDestinations)
|
|
|
|
|
2024-07-16 09:02:16 +00:00
|
|
|
api := app.Group(baseURL).Name("API")
|
2024-06-22 04:29:20 +00:00
|
|
|
{
|
2024-07-25 14:02:26 +00:00
|
|
|
api.Get("/attachments", list)
|
2024-06-22 04:29:20 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|