fix: Agregar campo model a endpoints POST/PUT de impresoras
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 36s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 36s
This commit is contained in:
@@ -14,10 +14,11 @@ export default defineEventHandler(async (event) => {
|
|||||||
|
|
||||||
const body = await readBody(event)
|
const body = await readBody(event)
|
||||||
|
|
||||||
const { name, host, deviceId, timeout, isDefault } = body as {
|
const { name, host, deviceId, model, timeout, isDefault } = body as {
|
||||||
name?: string
|
name?: string
|
||||||
host?: string
|
host?: string
|
||||||
deviceId?: string
|
deviceId?: string
|
||||||
|
model?: string
|
||||||
timeout?: number
|
timeout?: number
|
||||||
isDefault?: boolean
|
isDefault?: boolean
|
||||||
}
|
}
|
||||||
@@ -26,6 +27,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
name,
|
name,
|
||||||
host,
|
host,
|
||||||
deviceId,
|
deviceId,
|
||||||
|
model,
|
||||||
timeout,
|
timeout,
|
||||||
isDefault
|
isDefault
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,10 +5,11 @@ export default defineEventHandler(async (event) => {
|
|||||||
try {
|
try {
|
||||||
const body = await readBody(event)
|
const body = await readBody(event)
|
||||||
|
|
||||||
const { name, host, deviceId, timeout, isDefault } = body as {
|
const { name, host, deviceId, model, timeout, isDefault } = body as {
|
||||||
name: string
|
name: string
|
||||||
host: string
|
host: string
|
||||||
deviceId: string
|
deviceId: string
|
||||||
|
model?: string
|
||||||
timeout?: number
|
timeout?: number
|
||||||
isDefault?: boolean
|
isDefault?: boolean
|
||||||
}
|
}
|
||||||
@@ -24,6 +25,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
name,
|
name,
|
||||||
host,
|
host,
|
||||||
deviceId,
|
deviceId,
|
||||||
|
model,
|
||||||
timeout,
|
timeout,
|
||||||
isDefault
|
isDefault
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user