fix(core): update
This commit is contained in:
@@ -18,6 +18,18 @@ export interface IOraOrganization {
|
||||
}
|
||||
|
||||
export class OraOrganization implements IOraOrganization {
|
||||
// ======
|
||||
// STATIC
|
||||
// ======
|
||||
public static async getAllOrganizations(oraRef: Ora): Promise<OraOrganization[]> {
|
||||
const response = await oraRef.request('/organizations', 'GET');
|
||||
const organizations: OraOrganization[] = [];
|
||||
for (const orgData of response.data) {
|
||||
organizations.push(new OraOrganization(oraRef, orgData));
|
||||
}
|
||||
return organizations;
|
||||
}
|
||||
|
||||
public created_at: string;
|
||||
public description: string;
|
||||
public id: number;
|
||||
@@ -31,15 +43,6 @@ export class OraOrganization implements IOraOrganization {
|
||||
public updated_at: string;
|
||||
public web: string;
|
||||
|
||||
public static async getAllOrganizations(oraRef: Ora): Promise<OraOrganization[]> {
|
||||
const response = await oraRef.request('/organizations', 'GET');
|
||||
const organizations: OraOrganization[] = [];
|
||||
for (const orgData of response.data) {
|
||||
organizations.push(new OraOrganization(oraRef, orgData));
|
||||
}
|
||||
return organizations;
|
||||
}
|
||||
|
||||
// ========
|
||||
// INSTANCE
|
||||
// ========
|
||||
@@ -50,7 +53,7 @@ export class OraOrganization implements IOraOrganization {
|
||||
Object.assign(this, creationObjectArg);
|
||||
}
|
||||
|
||||
public async getAllProjects(): Promise<OraProject[]> {
|
||||
public async getProjects(): Promise<OraProject[]> {
|
||||
return OraProject.getAllProjectsForOrganization(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user