Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
[proxy]Javascript增加findLocation()方法
Browse files Browse the repository at this point in the history
  • Loading branch information
iwind committed Nov 15, 2019
1 parent c75ecc6 commit f502397
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/web/libs/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ http.Server = function (options) {

return null;
};

this.findLocation = function (locationId) {
for (var i = 0; i < this.locations.length; i++) {
if (this.locations[i].id == locationId) {
return this.locations[i];
}
}
return null;
};
};

http.Backend = function (options) {
Expand Down

0 comments on commit f502397

Please sign in to comment.