This commit is contained in:
Nawaz Dhandala 2022-04-14 21:41:35 +01:00
parent 00657d5eff
commit 97593aa68a
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
14 changed files with 19 additions and 19 deletions

View File

@ -107,7 +107,7 @@ router.get(
isAuthorized,
async (req: ExpressRequest, res: ExpressResponse) => {
try {
let { skip, limit } = req.query;
let {skip, limit}: $TSFixMe = req.query;
const { projectId }: $TSFixMe = req.params;
if (typeof skip === 'string') {

View File

@ -21,7 +21,7 @@ router.get(
async (req: ExpressRequest, res: ExpressResponse) => {
try {
const userId: $TSFixMe = req.params.userId;
let { skip, limit } = req.query;
let {skip, limit}: $TSFixMe = req.query;
if (!skip) {
skip = 0;
}

View File

@ -355,7 +355,7 @@ router.get(
async (req: ExpressRequest, res: ExpressResponse) => {
try {
const { performanceTrackerId }: $TSFixMe = req.params;
let { startDate, endDate } = req.query;
let {startDate, endDate}: $TSFixMe = req.query;
startDate = decode(startDate);

View File

@ -55,7 +55,7 @@ router.get(
async (req: ExpressRequest, res: ExpressResponse) => {
try {
const { appId }: $TSFixMe = req.params;
let { startDate, endDate } = req.query;
let {startDate, endDate}: $TSFixMe = req.query;
startDate = decode(startDate);
@ -123,7 +123,7 @@ router.get(
async (req, res): void => {
try {
const { appId }: $TSFixMe = req.params;
let { startDate, endDate } = req.query;
let {startDate, endDate}: $TSFixMe = req.query;
startDate = decode(startDate);
@ -190,7 +190,7 @@ router.get(
async (req: ExpressRequest, res: ExpressResponse) => {
try {
const { appId }: $TSFixMe = req.params;
let { startDate, endDate } = req.query;
let {startDate, endDate}: $TSFixMe = req.query;
startDate = decode(startDate);
@ -260,7 +260,7 @@ router.get(
try {
const { appId }: $TSFixMe = req.params;
const { type, skip, limit }: $TSFixMe = req.query;
let { startDate, endDate } = req.query;
let {startDate, endDate}: $TSFixMe = req.query;
startDate = decode(startDate);

View File

@ -412,7 +412,7 @@ router.put(
message: 'ProjectId must be present.',
});
}
let { rechargeBalanceAmount } = req.body;
let {rechargeBalanceAmount}: $TSFixMe = req.body;
if (typeof rechargeBalanceAmount === 'string') {
rechargeBalanceAmount = parseFloat(rechargeBalanceAmount);
}

View File

@ -80,7 +80,7 @@ router.post(
checkUser,
async (req: ExpressRequest, res: ExpressResponse) => {
try {
let { handle } = req.body;
let {handle}: $TSFixMe = req.body;
if (handle.includes('https://twitter.com/')) {
handle = handle.replace('https://twitter.com/', '');

View File

@ -203,7 +203,7 @@ router.post(
try {
const userId: $TSFixMe = req.user ? req.user.id : null;
const { projectId }: $TSFixMe = req.params;
let { rechargeBalanceAmount } = req.body;
let {rechargeBalanceAmount}: $TSFixMe = req.body;
rechargeBalanceAmount = Number(rechargeBalanceAmount);
if (!rechargeBalanceAmount) {
return sendErrorResponse(req, res, {

View File

@ -1700,7 +1700,7 @@ export default class Service {
});
if (monitor) {
// eslint-disable-next-line prefer-const
let { monitorSla, projectId } = monitor;
let {monitorSla, projectId}: $TSFixMe = monitor;
if (!monitorSla) {
monitorSla = await MonitorSlaService.findOneBy({

View File

@ -925,7 +925,7 @@ class Service extends DatabaseService<typeof Model> {
async processHttpRequest(data): void {
const { monitor, body }: $TSFixMe = data;
let { queryParams, headers } = data;
let {queryParams, headers}: $TSFixMe = data;
queryParams = this.toArray(queryParams);
headers = this.toArray(headers);
let status, reason;

View File

@ -70,7 +70,7 @@ describe('OneUptime Page Reload', () => {
timeout: init.timeout,
});
const spanElement2 = await init.pageWaitForSelector(
const spanElement2: $TSFixMe = await init.pageWaitForSelector(
page,
`#gitUsername_${gitUsername}`
);

View File

@ -98,9 +98,9 @@ describe('Monitor Detail API', () => {
waitUntil: ['networkidle0', 'domcontentloaded'],
});
const probe0 = await init.pageWaitForSelector(page, '#probes-btn0');
const probe0: $TSFixMe = await init.pageWaitForSelector(page, '#probes-btn0');
const probe1 = await init.pageWaitForSelector(page, '#probes-btn1');
const probe1: $TSFixMe = await init.pageWaitForSelector(page, '#probes-btn1');
expect(probe0).toBeDefined();
expect(probe1).toBeDefined();

View File

@ -313,14 +313,14 @@ describe('Monitor API With SubProjects', () => {
await init.pageClick(page, '#cbMonitors');
/* UI CHANGES: Badge has been removed! */
const additionalMonitor1 = await init.pageWaitForSelector(
const additionalMonitor1: $TSFixMe = await init.pageWaitForSelector(
page,
`#monitor-title-${monitorName}`
);
expect(additionalMonitor1).toBeDefined();
const additionalMonitor2 = await init.pageWaitForSelector(
const additionalMonitor2: $TSFixMe = await init.pageWaitForSelector(
page,
`#monitor-title-${monitorName}1`
);

View File

@ -69,7 +69,7 @@ describe('OneUptime Page Reload', () => {
timeout: init.timeout,
}
);
const spanElement2 = await init.pageWaitForSelector(
const spanElement2: $TSFixMe = await init.pageWaitForSelector(
page,
'#probe_1',
{

View File

@ -58,7 +58,7 @@ describe('OneUptime Page Reload', () => {
await page.reload({ waitUntil: 'networkidle2' });
await page.waitForSelector('#cbProjectSettings', { visible: true });
await page.waitForSelector('#cbTeamGroups', { visible: true });
const spanElement2 = await page.waitForSelector(
const spanElement2: $TSFixMe = await page.waitForSelector(
`#sub_project_name_${groupName}`
);
expect(spanElement2).toBeDefined();