Skip to content

Commit

Permalink
- fixed bug (cache_resource_url when deleting resource)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbsmfather committed Dec 6, 2022
1 parent 82b6f11 commit 00a2665
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2490,13 +2490,11 @@ app.delete(onem2mParser, (request, response) => {
delete cache_resource_url[request.url];
}

if(cache_resource_url.hasOwnProperty(request.url + '/la')) {
delete cache_resource_url[request.url + '/la'];
}

if(cache_resource_url.hasOwnProperty(request.pi + '/la')) {
delete cache_resource_url[request.pi + '/la'];
}
Object.keys(cache_resource_url).forEach((_url) => {
if(_url.includes(request.url+'/')) {
delete cache_resource_url[_url];
}
});

responder.response_result(request, response, '200', '2002', '', () => {
connection.release();
Expand Down

0 comments on commit 00a2665

Please sign in to comment.