mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 07:10:53 +00:00
fix lint.
This commit is contained in:
parent
bb4e9f95df
commit
9b9e38eea8
@ -434,7 +434,7 @@ router.post('/sso/callback', async function(req, res) {
|
||||
code: 400,
|
||||
message: 'SSO not defined for the domain.',
|
||||
});
|
||||
x;
|
||||
|
||||
if (!sso['saml-enabled'])
|
||||
return sendErrorResponse(req, res, {
|
||||
code: 401,
|
||||
|
@ -267,7 +267,7 @@ module.exports = {
|
||||
},
|
||||
deleteBy: async function(query) {
|
||||
try {
|
||||
let domainCount = await this.countBy(query);
|
||||
const domainCount = await this.countBy(query);
|
||||
|
||||
if (!domainCount || domainCount === 0) {
|
||||
const error = new Error('Domain not found or does not exist');
|
||||
@ -275,7 +275,7 @@ module.exports = {
|
||||
throw error;
|
||||
}
|
||||
|
||||
domain = await this.updateOneBy(query, {
|
||||
const domain = await this.updateOneBy(query, {
|
||||
deleted: true,
|
||||
deletedAt: Date.now(),
|
||||
});
|
||||
|
@ -97,7 +97,10 @@ module.exports = {
|
||||
},
|
||||
{ new: true }
|
||||
);
|
||||
gitCredential = await this.findOneBy({ _id: gitCredential._id, deleted: gitCredential.deleted }); // This is needed for proper query. It considers deleted and non-deleted git credentials
|
||||
gitCredential = await this.findOneBy({
|
||||
_id: gitCredential._id,
|
||||
deleted: gitCredential.deleted,
|
||||
}); // This is needed for proper query. It considers deleted and non-deleted git credentials
|
||||
|
||||
if (!gitCredential) {
|
||||
const error = new Error(
|
||||
|
@ -50,7 +50,7 @@ module.exports = {
|
||||
incidentPrioritiesQuery
|
||||
);
|
||||
|
||||
const incidentPriorities = await incidentPriorities;
|
||||
const incidentPriorities = await incidentPrioritiesQuery;
|
||||
|
||||
return incidentPriorities;
|
||||
} catch (error) {
|
||||
|
@ -286,6 +286,3 @@ describe('SSO API', function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
const selectSso =
|
||||
'_id saml-enabled domain entityId remoteLoginUrl certificateFingerprint remoteLogoutUrl ipRanges createdAt deleted deletedAt deletedById samlSsoUrl';
|
||||
|
@ -28,10 +28,13 @@ function getMongoClient() {
|
||||
const client = getMongoClient();
|
||||
(async function() {
|
||||
try {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('connecting to db');
|
||||
await client.connect();
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('connected to db');
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('connection error: ', error);
|
||||
}
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user