🐛 fix only office integration (#379)
🔒 Do not expose application API into (#372)" 🐛 Fix only office integration
This commit is contained in:
@@ -23,21 +23,21 @@ export class CompanyApplicationServiceImpl implements TdriveServiceProvider, Ini
|
||||
pk.application_id,
|
||||
context,
|
||||
);
|
||||
//do not expose application secret
|
||||
application.api = null;
|
||||
|
||||
if (!application?.id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
const app = {
|
||||
...{
|
||||
id: pk.application_id,
|
||||
company_id: pk.company_id,
|
||||
application_id: pk.application_id,
|
||||
},
|
||||
application: application,
|
||||
application: { ...application },
|
||||
};
|
||||
app.application.api = null;
|
||||
return app;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
return null;
|
||||
@@ -64,13 +64,14 @@ export class CompanyApplicationServiceImpl implements TdriveServiceProvider, Ini
|
||||
companyApplication.application_id,
|
||||
context,
|
||||
);
|
||||
//do not expose application secret
|
||||
application.api = null;
|
||||
if (application)
|
||||
applications.push({
|
||||
if (application) {
|
||||
const app = {
|
||||
...companyApplication,
|
||||
application: application,
|
||||
});
|
||||
application: { ...application },
|
||||
};
|
||||
app.application.api = null;
|
||||
applications.push(app);
|
||||
}
|
||||
}
|
||||
|
||||
return new ListResult<CompanyApplicationWithApplication>("applications", applications, null);
|
||||
|
||||
Reference in New Issue
Block a user