Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
aliceclv committed Aug 17, 2020
1 parent 6520f50 commit 33ec7d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/routes/cleanJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { BullBoardQueues } from '../@types/app'

export const cleanJob: RequestHandler = async (req, res) => {
try {
const { bullBoardQueues }: { bullBoardQueues: BullBoardQueues } = req.app.locals
const {
bullBoardQueues,
}: { bullBoardQueues: BullBoardQueues } = req.app.locals
const { queueName, id } = req.params
const { queue } = bullBoardQueues[queueName]

Expand All @@ -27,7 +29,7 @@ export const cleanJob: RequestHandler = async (req, res) => {
} catch (error) {
const body = {
error: 'queue error',
details: error.stack
details: error.stack,
}
return res.status(500).send(body)
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/Job.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const Job = ({
job: AppJob
status: Status
queueName: string
cleanJob:(job: AppJob) => () => Promise<void>
cleanJob: (job: AppJob) => () => Promise<void>
retryJob: (job: AppJob) => () => Promise<void>
promoteJob: (job: AppJob) => () => Promise<void>
}) => {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const FIELDS: Record<Status, Field[]> = {
'opts',
'promote',
'timestamps',
'clean'
'clean',
],
failed: [
'attempts',
Expand All @@ -56,7 +56,7 @@ export const FIELDS: Record<Status, Field[]> = {
'progress',
'retry',
'timestamps',
'clean'
'clean',
],
latest: ['attempts', 'data', 'id', 'name', 'opts', 'progress', 'timestamps'],
paused: ['attempts', 'data', 'id', 'name', 'opts', 'timestamps'],
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/hooks/useStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const useStore = (basePath: string): Store => {
},
).then(update)

const cleanJob = (queueName: string) => (job: AppJob) => () =>
const cleanJob = (queueName: string) => (job: AppJob) => () =>
fetch(
`${basePath}/queues/${encodeURIComponent(queueName)}/${job.id}/clean`,
{
Expand Down

0 comments on commit 33ec7d5

Please sign in to comment.