@@ -49,6 +49,8 @@ public enum Routers: URLRequestConvertible {
49
49
case getMyEntities
50
50
/// GET /getActiveEntities
51
51
case getActiveEntities
52
+ /// POST /changeActiveEntities
53
+ case changeActiveEntities( [ String : AnyObject ] )
52
54
/// GET /getFullSession
53
55
case getFullSession
54
56
/// GET /getGlpiConfig
@@ -62,7 +64,7 @@ public enum Routers: URLRequestConvertible {
62
64
case . initSession, . initSessionByBasicAuth, . killSession, . getMyProfiles, . getActiveProfile,
63
65
. getMyEntities, . getActiveEntities, . getFullSession, . getGlpiConfig, . getMultipleItems:
64
66
return . get
65
- case . changeActiveProfile:
67
+ case . changeActiveProfile, . changeActiveEntities :
66
68
return . post
67
69
}
68
70
}
@@ -85,6 +87,8 @@ public enum Routers: URLRequestConvertible {
85
87
return " /getMyEntities "
86
88
case . getActiveEntities:
87
89
return " /getActiveEntities "
90
+ case . changeActiveEntities:
91
+ return " /changeActiveEntities "
88
92
case . getFullSession:
89
93
return " /getFullSession "
90
94
case . getGlpiConfig:
@@ -99,8 +103,8 @@ public enum Routers: URLRequestConvertible {
99
103
100
104
switch self {
101
105
case . initSession, . initSessionByBasicAuth, . killSession, . getMyProfiles, . getActiveProfile,
102
- . changeActiveProfile, . getMyEntities, . getActiveEntities, . getFullSession , . getGlpiConfig ,
103
- . getMultipleItems:
106
+ . changeActiveProfile, . getMyEntities, . getActiveEntities, . changeActiveEntities ,
107
+ . getFullSession , . getGlpiConfig , . getMultipleItems:
104
108
return " "
105
109
}
106
110
}
@@ -155,7 +159,7 @@ public enum Routers: URLRequestConvertible {
155
159
}
156
160
157
161
switch self {
158
- case . changeActiveProfile( let parameters) :
162
+ case . changeActiveProfile( let parameters) , . changeActiveEntities ( let parameters ) :
159
163
return try Alamofire . JSONEncoding. default. encode ( urlRequest, with: parameters)
160
164
default :
161
165
return urlRequest
0 commit comments