mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix plugins members.
This commit is contained in:
parent
f3a49e7051
commit
93125abfd7
@ -537,22 +537,22 @@ function showPlugins(id: string, profile: ApiModels.MemberProfile) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function savePlugins() {
|
async function savePlugins() {
|
||||||
if (!plugins.value) return
|
if (!plugins.value) return
|
||||||
|
|
||||||
let errKey = ''
|
let errKey = ''
|
||||||
try {
|
try {
|
||||||
let plugins = {} as any
|
let p = {} as any
|
||||||
for (let [key, val] of plugins.value.old) {
|
for (let [key, val] of plugins.value.old) {
|
||||||
errKey = key
|
errKey = key
|
||||||
plugins[key] = JSON.parse(val)
|
p[key] = JSON.parse(val)
|
||||||
}
|
}
|
||||||
for (let [key, val] of plugins.value.new) {
|
for (let [key, val] of plugins.value.new) {
|
||||||
errKey = key
|
errKey = key
|
||||||
plugins[key] = JSON.parse(val)
|
p[key] = JSON.parse(val)
|
||||||
}
|
}
|
||||||
|
|
||||||
updateProfile(plugins.value.id, { plugins })
|
await updateProfile(plugins.value.id, { plugins: p })
|
||||||
plugins.value = null
|
plugins.value = null
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
alert(errKey + ': ' + e)
|
alert(errKey + ': ' + e)
|
||||||
|
Loading…
Reference in New Issue
Block a user