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

Enon => Rename enonce creation function

parent 2dcf8c69
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ class EnonceCreateCommand extends CommanderCommand { ...@@ -86,7 +86,7 @@ class EnonceCreateCommand extends CommanderCommand {
console.log(chalk.cyan('Please wait while we are creating the enonce...')); console.log(chalk.cyan('Please wait while we are creating the enonce...'));
try { try {
const enonce: Enonce = await DojoBackendManager.createProject(options.name, members, templateIdOrNamespace); const enonce: Enonce = await DojoBackendManager.createEnonce(options.name, members, templateIdOrNamespace);
const oraInfo = (message: string) => { const oraInfo = (message: string) => {
ora({ ora({
......
...@@ -27,7 +27,7 @@ class DojoBackendManager { ...@@ -27,7 +27,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(this.getApiUrl(ApiRoutes.ENONCE_GET).replace('{{nameOrUrl}}', decodeURIComponent(nameOrUrl))); return (await axios.get<DojoResponse<Enonce>>(this.getApiUrl(ApiRoutes.ENONCE_GET).replace('{{nameOrUrl}}', decodeURIComponent(nameOrUrl)))).data.data;
} catch ( error ) { } catch ( error ) {
return undefined; return undefined;
} }
...@@ -70,7 +70,7 @@ class DojoBackendManager { ...@@ -70,7 +70,7 @@ class DojoBackendManager {
} }
} }
public async createProject(name: string, members: Array<GitlabUser>, templateIdOrNamespace: string | null, verbose: boolean = true): Promise<Enonce> { public async createEnonce(name: string, members: Array<GitlabUser>, templateIdOrNamespace: string | null, verbose: boolean = true): Promise<Enonce> {
const spinner: ora.Ora = ora('Creating enonce...'); const spinner: ora.Ora = ora('Creating enonce...');
if ( verbose ) { if ( verbose ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment