summaryrefslogtreecommitdiffstats
path: root/lib/apiv1/events.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/apiv1/events.go')
-rw-r--r--lib/apiv1/events.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/apiv1/events.go b/lib/apiv1/events.go
index 8f92ae0..9444262 100644
--- a/lib/apiv1/events.go
+++ b/lib/apiv1/events.go
@@ -122,11 +122,15 @@ func (s *APIService) eventsRegister(c *gin.Context) {
data := make(folder.EventCBData)
data["sid"] = sess.ID
- err := s.mfolders.RegisterEventChange(args.ProjectID, &cbFunc, &data)
+ prjID, err := s.mfolders.ResolveID(args.ProjectID)
if err != nil {
common.APIError(c, err.Error())
return
}
+ if err = s.mfolders.RegisterEventChange(prjID, &cbFunc, &data); err != nil {
+ common.APIError(c, err.Error())
+ return
+ }
c.JSON(http.StatusOK, gin.H{"status": "OK"})
}