Skip to content

Commit

Permalink
Updated newApplication
Browse files Browse the repository at this point in the history
  • Loading branch information
mrinc committed Apr 5, 2024
1 parent 4057921 commit d0239d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugins/service-iq-enterprise/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class IQEnterprise<
hostname?: string,
username?: string,
password?: string
): Promise<number> {
): Promise<string> {
return await this.events.emitEventAndReturn(
"newApplication",
30,
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/service-iq-enterprise/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface Events<Meta extends object> extends BSBPluginEvents {
hostname?: string,
username?: string,
password?: string
): Promise<number>;
): Promise<string>;
getApplications(
email: string,
hostname?: string,
Expand Down Expand Up @@ -364,11 +364,11 @@ export class Plugin<Meta extends object = any> extends BSBService<
delete data.meta;
(data as any).debitorder = true;
const resp = await axios.post<{
idapplication?: number;
uid?: string;
}>(`/api/portal/application/create`, data);
if (resp.status == 200) {
if (Tools.isNumber(resp.data.idapplication)) {
return resp.data.idapplication;
if (Tools.isString(resp.data.uid)) {
return resp.data.uid;
}
}
throw new Error(
Expand Down

0 comments on commit d0239d3

Please sign in to comment.