mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-15 03:44:31 +08:00
Convert more
This commit is contained in:
parent
3b9e119044
commit
8b0b3d936c
1 changed files with 9 additions and 6 deletions
|
|
@ -89,12 +89,15 @@ const actionModals: Record<Action, SimpleModal> = {
|
|||
};
|
||||
}
|
||||
|
||||
DB.getSnapshot()?.tags?.forEach((tag) => {
|
||||
if (tag._id === tagId) {
|
||||
tag.name = tagName;
|
||||
tag.display = propTagName;
|
||||
}
|
||||
});
|
||||
const matchingTag = DB.getSnapshot()?.tags.find(
|
||||
(tag) => tag._id === tagId,
|
||||
);
|
||||
|
||||
if (matchingTag !== undefined) {
|
||||
matchingTag.name = tagName;
|
||||
matchingTag.display = propTagName;
|
||||
}
|
||||
|
||||
void Settings.update();
|
||||
|
||||
return { status: 1, message: `Tag updated` };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue