mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-09 07:25:21 +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>}
|
* @returns {Promise<Alias>}
|
||||||
*/
|
*/
|
||||||
static async get(aliasName) {
|
static async get(aliasName) {
|
||||||
const alias = await Alias.get(aliasName.slice(1));
|
const alias = await Alias.get(aliasName);
|
||||||
|
|
||||||
if (!alias.id) {
|
if (!alias.id) {
|
||||||
throw new Error('Entity with given alias does not exist');
|
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.have.status(200);
|
||||||
expect(put).to.be.json;
|
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);
|
expect(get).to.have.status(200);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue