File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ + (NSString*) sanitizePID:(NSString*) pid{
179179 /*
180180 /media/tracks/ID
181181 */
182- if ([method isEqualToString: @" PATCH" ]){
182+ if ([method isEqualToString: @" PATCH" ] || [method isEqualToString: @" POST " ] ){
183183 NSData *data = [request body ];
184184 NSString *str = [[NSString alloc ] initWithData: data encoding: NSUTF8StringEncoding];
185185
@@ -208,12 +208,12 @@ + (NSString*) sanitizePID:(NSString*) pid{
208208 }
209209 }
210210
211- if ([method isEqualToString: @" GET" ] || [method isEqualToString: @" PATCH" ]) {
211+ if ([method isEqualToString: @" GET" ] || [method isEqualToString: @" PATCH" ] || [method isEqualToString: @" POST " ] ) {
212212 NSString *trackPath=[service pathForTrackWithID: tid];
213213 trackLocation=[service locationForTrackPath: trackPath];
214214 ret=[service jsonTrackWithID: tid];
215215 }else {
216- return [[RESTResponse alloc ] initWithJSON: @" Only GET and PATCH methods are allowed to this resource" andStatus: 400 ];
216+ return [[RESTResponse alloc ] initWithJSON: @" Only GET and PATCH(POST) methods are allowed to this resource" andStatus: 400 ];
217217 }
218218 }else {
219219 /*
You can’t perform that action at this time.
0 commit comments