forked from yoone/API
1
0
Fork 0

增加返回值

This commit is contained in:
黄珑 2025-08-13 17:50:22 +08:00
parent 8e256f67a5
commit 47ee4e6bcd
2 changed files with 7 additions and 7 deletions

View File

@ -58,12 +58,12 @@ export class AuthMiddleware implements IMiddleware<Context, NextFunction> {
} }
// 3. 校验设备是否在白名单 // 3. 校验设备是否在白名单
const isWhite = await this.deviceWhitelistService.isWhitelisted( // const isWhite = await this.deviceWhitelistService.isWhitelisted(
deviceId // deviceId
); // );
if (!isWhite) { // if (!isWhite) {
throw new httpError.UnauthorizedError('Device not authorized'); // throw new httpError.UnauthorizedError('Device not authorized');
} // }
} catch (error) { } catch (error) {
throw new httpError.UnauthorizedError('Invalid or expired token'); throw new httpError.UnauthorizedError('Invalid or expired token');
} }

View File

@ -656,7 +656,7 @@ export class LogisticsService {
} }
const sql = ` const sql = `
SELECT s.*, sp.name, o.externalOrderId SELECT s.*, sp.name, o.externalOrderId, o.siteId
FROM shipment s FROM shipment s
LEFT JOIN \`order\` o ON s.order_id = o.id LEFT JOIN \`order\` o ON s.order_id = o.id
LEFT JOIN stock_point sp ON s.stock_point_id = sp.id LEFT JOIN stock_point sp ON s.stock_point_id = sp.id