mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix
This commit is contained in:
@@ -48,9 +48,9 @@ router.post(
|
||||
try {
|
||||
const { monitor, resp }: $TSFixMe = req.body;
|
||||
|
||||
let status,
|
||||
reason,
|
||||
data = {};
|
||||
let status: $TSFixMe,
|
||||
reason: $TSFixMe,
|
||||
data: $TSFixMe = {};
|
||||
let matchedCriterion: $TSFixMe;
|
||||
|
||||
// determine if monitor is up and reasons therefore
|
||||
|
||||
@@ -95,7 +95,7 @@ describe('Monitor API', function (): void {
|
||||
|
||||
ComponentModel.create(
|
||||
{ name: 'Test Component' },
|
||||
(err, component): void => {
|
||||
(err: $TSFixMe,component : $TSFixMe): void => {
|
||||
componentId = component;
|
||||
VerificationTokenModel.findOne(
|
||||
{ userId },
|
||||
@@ -485,7 +485,7 @@ describe('API Monitor API', function (): void {
|
||||
|
||||
ComponentModel.create(
|
||||
{ name: 'Test Component' },
|
||||
(err, component): void => {
|
||||
(err: $TSFixMe,component : $TSFixMe): void => {
|
||||
componentId = component;
|
||||
VerificationTokenModel.findOne(
|
||||
{ userId },
|
||||
@@ -709,7 +709,7 @@ describe('IncomingHttpRequest Monitor', function (): void {
|
||||
|
||||
ComponentModel.create(
|
||||
{ name: 'Test Component' },
|
||||
(err, component): void => {
|
||||
(err: $TSFixMe,component : $TSFixMe): void => {
|
||||
componentId = component;
|
||||
VerificationTokenModel.findOne(
|
||||
{ userId },
|
||||
|
||||
@@ -45,7 +45,7 @@ describe('Project API', function (): void {
|
||||
VerificationTokenModel.findOne(
|
||||
{ userId },
|
||||
(
|
||||
err: $TSFixMe ,
|
||||
err: $TSFixMe,
|
||||
|
||||
verificationToken: $TSFixMe
|
||||
) => {
|
||||
@@ -312,7 +312,7 @@ describe('Project API', function (): void {
|
||||
planId: 'enterprise',
|
||||
})
|
||||
|
||||
.end((err, response): void => {
|
||||
.end( (err: $TSFixMe,response : $TSFixMe): void => {
|
||||
expect(response).to.have.status(400);
|
||||
done();
|
||||
});
|
||||
@@ -332,7 +332,7 @@ describe('Project API', function (): void {
|
||||
planId: 'enterprise',
|
||||
})
|
||||
|
||||
.end((err, response): void => {
|
||||
.end( (err: $TSFixMe,response : $TSFixMe): void => {
|
||||
expect(response).to.have.status(200);
|
||||
expect(response.body.stripePlanId).to.be.equal(
|
||||
'enterprise'
|
||||
@@ -358,7 +358,7 @@ describe('Project API', function (): void {
|
||||
newPlan: `${plans[1].category} ${plans[1].details}`,
|
||||
})
|
||||
|
||||
.end((err, response): void => {
|
||||
.end( (err: $TSFixMe,response : $TSFixMe): void => {
|
||||
expect(response).to.have.status(200);
|
||||
|
||||
expect(response.body.stripePlanId).to.be.equal(plans[1].planId);
|
||||
@@ -382,7 +382,7 @@ describe('Project API', function (): void {
|
||||
newPlan: `${plans[1].category} ${plans[1].details}`,
|
||||
})
|
||||
|
||||
.end((err, response): void => {
|
||||
.end( (err: $TSFixMe,response : $TSFixMe): void => {
|
||||
expect(response).to.have.status(200);
|
||||
|
||||
expect(response.body.stripePlanId).to.be.equal(plans[1].planId);
|
||||
|
||||
@@ -19,7 +19,10 @@ import AirtableService from '../backend/services/airtableService';
|
||||
|
||||
import VerificationTokenModel from '../backend/models/verificationToken';
|
||||
|
||||
let token: $TSFixMe, projectId: ObjectID, scheduleId: $TSFixMe, userId: $TSFixMe;
|
||||
let token: $TSFixMe,
|
||||
projectId: ObjectID,
|
||||
scheduleId: $TSFixMe,
|
||||
userId: $TSFixMe;
|
||||
|
||||
describe('Schedule API', function (): void {
|
||||
this.timeout(30000);
|
||||
|
||||
@@ -19,7 +19,10 @@ import AirtableService from '../backend/services/airtableService';
|
||||
|
||||
import VerificationTokenModel from '../backend/models/verificationToken';
|
||||
|
||||
let token: $TSFixMe, projectId: ObjectID, userId: $TSFixMe, smsTemplateId: $TSFixMe;
|
||||
let token: $TSFixMe,
|
||||
projectId: ObjectID,
|
||||
userId: $TSFixMe,
|
||||
smsTemplateId: $TSFixMe;
|
||||
|
||||
describe('SMS Template API', function (): void {
|
||||
this.timeout(20000);
|
||||
|
||||
@@ -25,12 +25,13 @@ import ComponentModel from '../backend/models/component';
|
||||
import ComponentService from '../backend/services/componentService';
|
||||
|
||||
let projectId: ObjectID,
|
||||
userId,
|
||||
userId: $TSFixMe,
|
||||
monitorId: $TSFixMe,
|
||||
token: $TSFixMe,
|
||||
subscriberId: $TSFixMe,
|
||||
statusPageId: $TSFixMe,
|
||||
componentId: $TSFixMe;
|
||||
|
||||
const monitor: $TSFixMe = {
|
||||
name: 'New Monitor',
|
||||
type: 'url',
|
||||
|
||||
@@ -14,7 +14,7 @@ export default class ObjectID {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
public toString(): string {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ export default class PositiveNumber {
|
||||
this.positiveNumber = positiveNumber;
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
public toString(): string {
|
||||
return this.positiveNumber.toString();
|
||||
}
|
||||
|
||||
toNumber(): number {
|
||||
public toNumber(): number {
|
||||
return this.positiveNumber;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export const RealtimeHostname: string = process.env['REALTIME_HOSTNAME'] || '';
|
||||
|
||||
export const Version: string = process.env['npm_package_version'] || '';
|
||||
|
||||
export const HttpProtocol: Protocol: Function = (
|
||||
export const HttpProtocol: Protocol = (
|
||||
process.env['HTTP_PROTOCOL'] || ''
|
||||
).includes('https')
|
||||
? Protocol.HTTPS
|
||||
|
||||
@@ -207,7 +207,7 @@ export default class Service {
|
||||
// this timelines will be used in status page
|
||||
public async getIncidentLastTimelines(incidents: $TSFixMe): void {
|
||||
const skip: $TSFixMe = 0,
|
||||
limit = 1;
|
||||
limit: PositiveNumber = 1;
|
||||
|
||||
const populateIncTimeline: $TSFixMe = [
|
||||
{ path: 'createdById', select: 'name' },
|
||||
@@ -268,4 +268,5 @@ import flattenArray from '../Utils/flattenArray';
|
||||
|
||||
import FindOneBy from '../Types/DB/FindOneBy';
|
||||
import FindBy from '../Types/DB/FindBy';
|
||||
import Query from '../Types/DB/Query';
|
||||
import Query from '../Types/DB/Query';import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user