1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-12-09 23:53:11 +00:00

Compare commits

..

No commits in common. "4ff64ad51427057d72420941b0576822847195b2" and "78843418de82a95f828d0a6ac7c305dda4baa28b" have entirely different histories.

3 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "ClassworksKV", "name": "ClassworksKV",
"version": "1.3.2", "version": "1.3.1",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "node ./bin/www", "start": "node ./bin/www",

View File

@ -584,7 +584,6 @@ router.get("/devices", jwtAuth, async (req, res, next) => {
id: true, id: true,
uuid: true, uuid: true,
name: true, name: true,
namespace: true,
createdAt: true, createdAt: true,
updatedAt: true, updatedAt: true,
}, },

View File

@ -287,8 +287,8 @@ router.post(
} }
// 验证 token 类型是否为 student // 验证 token 类型是否为 student
if (!['student','parent'].includes(appInstall.deviceType)) { if (appInstall.deviceType !== 'student') {
return next(errors.createError(403, "只有学生和家长类型的 token 可以设置名称")); return next(errors.createError(403, "只有学生类型的 token 可以设置名称"));
} }
// 读取设备的 classworks-list-main 键值 // 读取设备的 classworks-list-main 键值
@ -326,7 +326,7 @@ router.post(
// 更新 AppInstall 的 note 字段 // 更新 AppInstall 的 note 字段
const updatedInstall = await prisma.appInstall.update({ const updatedInstall = await prisma.appInstall.update({
where: { id: appInstall.id }, where: { id: appInstall.id },
data: { note: appInstall.deviceType === 'parent' ? `${name} 家长` : name }, data: { note: name },
}); });
return res.json({ return res.json({