summaryrefslogtreecommitdiffstats
path: root/lib/apiv1/apiv1.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-24 01:28:00 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-24 01:28:00 +0100
commit67a7d6e46143410a5fa9cfa2554023ab7687ea34 (patch)
tree6168592c5cc72a39795aa49a5683a81f2b872a19 /lib/apiv1/apiv1.go
parentd2335afe1058153a3aad27fa483499b0639e096c (diff)
Add folder update support and ClientData field.
- folder config can be updated using PUT /folders/:id route - ClientData field of FolderConfig can be used by client to store any data (used from example by dashboard to save build settings)
Diffstat (limited to 'lib/apiv1/apiv1.go')
-rw-r--r--lib/apiv1/apiv1.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/apiv1/apiv1.go b/lib/apiv1/apiv1.go
index d10a08e..fffed2d 100644
--- a/lib/apiv1/apiv1.go
+++ b/lib/apiv1/apiv1.go
@@ -40,6 +40,7 @@ func New(r *gin.Engine, sess *session.Sessions, cfg *xdsconfig.Config, mfolders
s.apiRouter.GET("/folders", s.getFolders)
s.apiRouter.GET("/folders/:id", s.getFolder)
+ s.apiRouter.PUT("/folders/:id", s.updateFolder)
s.apiRouter.POST("/folders", s.addFolder)
s.apiRouter.POST("/folders/sync/:id", s.syncFolder)
s.apiRouter.DELETE("/folders/:id", s.delFolder)