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:
parent
b611b41a5c
commit
d4ce1b4ce9
2 changed files with 3 additions and 3 deletions
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue