add possibility to list, serve and delete attachments

see #52
This commit is contained in:
Bernhard B
2021-01-14 15:27:38 +01:00
parent 787bb2b50b
commit 510499b4ac
5 changed files with 383 additions and 4 deletions

View File

@@ -31,6 +31,9 @@ import (
// @tag.name Messages
// @tag.description Send and Receive Signal Messages.
// @tag.name Attachments
// @tag.description List and Delete Attachments.
// @host 127.0.0.1:8080
// @BasePath /
func main() {
@@ -76,6 +79,13 @@ func main() {
{
link.GET("", api.GetQrCodeLink)
}
attachments := v1.Group("attachments")
{
attachments.GET("", api.GetAttachments)
attachments.DELETE(":attachment", api.RemoveAttachment)
attachments.GET(":attachment", api.ServeAttachment)
}
}
v2 := router.Group("/v2")