Skip to content
Snippets Groups Projects
Commit b2def83e authored by michael.minelli's avatar michael.minelli
Browse files

DojoBackend => Bug fix: move from decodeURI to encodeURI

parent 437e7ac9
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ class DojoBackendManager { ...@@ -16,7 +16,7 @@ class DojoBackendManager {
public async getEnonce(nameOrUrl: string): Promise<Enonce | undefined> { public async getEnonce(nameOrUrl: string): Promise<Enonce | undefined> {
try { try {
return (await axios.get<DojoResponse<Enonce>>(this.getApiUrl(ApiRoutes.ENONCE_GET).replace('{{nameOrUrl}}', decodeURIComponent(nameOrUrl)))).data.data; return (await axios.get<DojoResponse<Enonce>>(this.getApiUrl(ApiRoutes.ENONCE_GET).replace('{{nameOrUrl}}', encodeURIComponent(nameOrUrl)))).data.data;
} catch ( error ) { } catch ( error ) {
return undefined; return undefined;
} }
...@@ -104,7 +104,7 @@ class DojoBackendManager { ...@@ -104,7 +104,7 @@ class DojoBackendManager {
} }
try { try {
const response = await axios.post<DojoResponse<Exercice>>(this.getApiUrl(ApiRoutes.EXERCICE_CREATE).replace('{{nameOrUrl}}', String(enonceName)), { members: JSON.stringify(members) }); const response = await axios.post<DojoResponse<Exercice>>(this.getApiUrl(ApiRoutes.EXERCICE_CREATE).replace('{{nameOrUrl}}', encodeURIComponent(enonceName)), { members: JSON.stringify(members) });
if ( verbose ) { if ( verbose ) {
spinner.succeed(`Exercice successfully created`); spinner.succeed(`Exercice successfully created`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment