-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added consolidated loading, see #682:
- New version of API in 'new-backend', v2. Same endpoints but different response: the new response consolidates previousl 3 separate requests and eliminates the need of them. - Changes in client to accomodate the new API: index rewritten - both old and new loading possible. Which is choosen is controlled by the 'experimentalNewApi' flag in appConfig.json. I had the opportunity to also consolidate the error rendering in index, it's now more consistent. Finally, some changes in MapSwitcher - we get the list of user specific maps from our new consolidated response and there's no need to do separate fetch anymore. - Added ESlint plugin to allow private fields/methods.
- Loading branch information
Showing
8 changed files
with
859 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import ConfigServiceV2 from "../../services/config.service.v2"; | ||
import ad from "../../services/activedirectory.service"; | ||
import handleStandardResponse from "../../utils/handleStandardResponse"; | ||
|
||
export class Controller { | ||
/** | ||
* @summary Get a specific map config using the supplied | ||
* request parameter "map" as map's name. | ||
* | ||
* @param {*} req | ||
* @param {*} res | ||
* @memberof Controller | ||
*/ | ||
byMap(req, res) { | ||
ConfigServiceV2.getMapWithLayers( | ||
req.params.map, | ||
ad.getUserFromRequestHeader(req) | ||
).then((data) => handleStandardResponse(res, data)); | ||
} | ||
} | ||
export default new Controller(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import * as express from "express"; | ||
import controller from "./controller"; | ||
|
||
export default express.Router().get("/:map", controller.byMap); // Get specific map config |
Oops, something went wrong.