1
This commit is contained in:
@@ -185,7 +185,9 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
'GET /user/delivery-config': async (ctx) => {
|
'GET /user/delivery-config': async (ctx) => {
|
||||||
try {
|
try {
|
||||||
|
console.log('[User Controller] 收到获取投递配置请求');
|
||||||
const { sn_code } = ctx.query;
|
const { sn_code } = ctx.query;
|
||||||
|
console.log('[User Controller] sn_code:', sn_code);
|
||||||
|
|
||||||
if (!sn_code) {
|
if (!sn_code) {
|
||||||
return ctx.fail('请提供设备SN码');
|
return ctx.fail('请提供设备SN码');
|
||||||
@@ -254,8 +256,10 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
'POST /user/delivery-config': async (ctx) => {
|
'POST /user/delivery-config': async (ctx) => {
|
||||||
try {
|
try {
|
||||||
|
console.log('[User Controller] 收到保存投递配置请求');
|
||||||
const body = ctx.getBody();
|
const body = ctx.getBody();
|
||||||
const { sn_code, config } = body;
|
const { sn_code, config } = body;
|
||||||
|
console.log('[User Controller] sn_code:', sn_code, 'config:', JSON.stringify(config));
|
||||||
|
|
||||||
if (!sn_code) {
|
if (!sn_code) {
|
||||||
return ctx.fail('请提供设备SN码');
|
return ctx.fail('请提供设备SN码');
|
||||||
|
|||||||
Reference in New Issue
Block a user