mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 15:24:55 +00:00
fix
This commit is contained in:
parent
00657d5eff
commit
97593aa68a
@ -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') {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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/', '');
|
||||
|
@ -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, {
|
||||
|
@ -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({
|
||||
|
@ -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;
|
||||
|
@ -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}`
|
||||
);
|
||||
|
@ -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();
|
||||
|
@ -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`
|
||||
);
|
||||
|
@ -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',
|
||||
{
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user