aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xdsserver/apiv1-sdks.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-22 23:05:20 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-23 00:41:58 +0100
commitf2eecfb601acc6c67fb52bf2edda93505bc44da5 (patch)
treec66957356bb6a706b5b6847254a18fdb09906e6a /lib/xdsserver/apiv1-sdks.go
parent1ecdc95d837e73509243d436fcafea0920599fbe (diff)
Fixed SDKs management when running in xds VM.v1.0.0-rc2
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/xdsserver/apiv1-sdks.go')
-rw-r--r--lib/xdsserver/apiv1-sdks.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/xdsserver/apiv1-sdks.go b/lib/xdsserver/apiv1-sdks.go
index b38c418..ba32dc9 100644
--- a/lib/xdsserver/apiv1-sdks.go
+++ b/lib/xdsserver/apiv1-sdks.go
@@ -114,9 +114,16 @@ func (s *APIService) removeSdk(c *gin.Context) {
return
}
+ // Retrieve session info
+ sess := s.sessions.Get(c)
+ if sess == nil {
+ common.APIError(c, "Unknown sessions")
+ return
+ }
+
s.Log.Debugln("Remove SDK id ", id)
- delEntry, err := s.sdks.Remove(id)
+ delEntry, err := s.sdks.Remove(id, -1, sess)
if err != nil {
common.APIError(c, err.Error())
return