mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-21 22:19:07 -04:00
Feat: Implement tags manager in settings
Fix: Remove unused color options Chore: Fix typo
This commit is contained in:
parent
d9f12a6376
commit
e9564619f1
10 changed files with 602 additions and 21 deletions
|
@ -941,13 +941,21 @@ let needSetup = false;
|
|||
try {
|
||||
checkLogin(socket);
|
||||
|
||||
let bean = await R.findOne("monitor", " id = ? ", [ tag.id ]);
|
||||
let bean = await R.findOne("tag", " id = ? ", [ tag.id ]);
|
||||
if (bean == null) {
|
||||
callback({
|
||||
ok: false,
|
||||
msg: "Tag not found",
|
||||
});
|
||||
return;
|
||||
}
|
||||
bean.name = tag.name;
|
||||
bean.color = tag.color;
|
||||
await R.store(bean);
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "Saved",
|
||||
tag: await bean.toJSON(),
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue