Task Attachments (#104)
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
// @title Vikunja API
|
||||
// @description This is the documentation for the [Vikunja](http://vikunja.io) API. Vikunja is a cross-plattform Todo-application with a lot of features, such as sharing lists with users or teams. <!-- ReDoc-Inject: <security-definitions> -->
|
||||
// @description # Authorization
|
||||
// @description **JWT-Auth:** Main authorization method, used for most of the requests. Needs ` + "`" + `Authorization: Bearer <jwt-token>` + "`" + `-header to authenticate successfully.
|
||||
// @description **JWT-Auth:** Main authorization method, used for most of the requests. Needs `Authorization: Bearer <jwt-token>`-header to authenticate successfully.
|
||||
// @description
|
||||
// @description **BasicAuth:** Only used when requesting tasks via caldav.
|
||||
// @description <!-- ReDoc-Inject: <security-definitions> -->
|
||||
@ -266,6 +266,16 @@ func registerAPIRoutes(a *echo.Group) {
|
||||
a.PUT("/tasks/:task/relations", taskRelationHandler.CreateWeb)
|
||||
a.DELETE("/tasks/:task/relations", taskRelationHandler.DeleteWeb)
|
||||
|
||||
taskAttachmentHandler := &handler.WebHandler{
|
||||
EmptyStruct: func() handler.CObject {
|
||||
return &models.TaskAttachment{}
|
||||
},
|
||||
}
|
||||
a.GET("/tasks/:task/attachments", taskAttachmentHandler.ReadAllWeb)
|
||||
a.DELETE("/tasks/:task/attachments/:attachment", taskAttachmentHandler.DeleteWeb)
|
||||
a.PUT("/tasks/:task/attachments", apiv1.UploadTaskAttachment)
|
||||
a.GET("/tasks/:task/attachments/:attachment", apiv1.GetTaskAttachment)
|
||||
|
||||
labelHandler := &handler.WebHandler{
|
||||
EmptyStruct: func() handler.CObject {
|
||||
return &models.Label{}
|
||||
|
Reference in New Issue
Block a user