1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-08 06:55:26 +02:00

Escaping special characters

This commit is contained in:
DorofeevMark 2019-01-09 22:31:30 +03:00
parent b611b41a5c
commit d4ce1b4ce9
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ class Aliases {
* @returns {Promise<Alias>}
*/
static async get(aliasName) {
const alias = await Alias.get(aliasName.slice(1));
const alias = await Alias.get(aliasName);
if (!alias.id) {
throw new Error('Entity with given alias does not exist');

View file

@ -49,9 +49,9 @@ describe('Aliases REST: ', () => {
expect(put).to.have.status(200);
expect(put).to.be.json;
const {result: {_id}} = put.body;
const {result: {uri}} = put.body;
const get = await agent.get(`/api/page/${_id}`);
const get = await agent.get(`/${uri}`);
expect(get).to.have.status(200);
});