style: formatting fixes (prettier compliance)
This commit is contained in:
1 parent
7882a49d71
commit
75436ad2f4
2 files changed
+13
-4
No files matched your search
@@ -42,7 +42,8 @@ export default class CwmpMiddleware {
|
||||
}
|
||||
|
||||
// Validate content type for non-empty requests
|
||||
const isXml = contentType.includes('text/xml') ||
|
||||
const isXml =
|
||||
contentType.includes('text/xml') ||
|
||||
contentType.includes('application/xml') ||
|
||||
contentType.includes('application/soap+xml') ||
|
||||
contentType === '' // Some CPEs don't set content-type
|
||||
|
||||
@@ -4,18 +4,26 @@ vi.mock('@adonisjs/core/services/logger', () => ({
|
||||
default: { info: vi.fn(), warn: vi.fn(), error: vi.fn(), debug: vi.fn() },
|
||||
}))
|
||||
vi.mock('#models/device', () => ({
|
||||
default: { createOrUpdate: vi.fn().mockResolvedValue({}), updateOne: vi.fn().mockResolvedValue({}) },
|
||||
default: {
|
||||
createOrUpdate: vi.fn().mockResolvedValue({}),
|
||||
updateOne: vi.fn().mockResolvedValue({}),
|
||||
},
|
||||
}))
|
||||
vi.mock('../../../../app/models/command.js', () => ({
|
||||
default: {
|
||||
getCollection: () => ({
|
||||
find: vi.fn().mockReturnValue({ sort: vi.fn().mockReturnValue({ toArray: vi.fn().mockResolvedValue([]) }) }),
|
||||
find: vi.fn().mockReturnValue({
|
||||
sort: vi.fn().mockReturnValue({ toArray: vi.fn().mockResolvedValue([]) }),
|
||||
}),
|
||||
}),
|
||||
updateCommand: vi.fn().mockResolvedValue({}),
|
||||
},
|
||||
}))
|
||||
|
||||
import { MainStateMachine, ExecutingCommandsState } from '../../../../app/services/cwmp/main_state_machine.js'
|
||||
import {
|
||||
MainStateMachine,
|
||||
ExecutingCommandsState,
|
||||
} from '../../../../app/services/cwmp/main_state_machine.js'
|
||||
import { Device } from '../../../../app/domain/device/device.js'
|
||||
import { DeviceId } from '../../../../app/domain/device/device_id.js'
|
||||
import { CWMPTaskQueue } from '../../../../app/services/cwmp/task_queue.js'
|
||||
|
||||
Reference in new issue
Block a user