Zertifizierung erforderlich ist weg
Dieser Commit ist enthalten in:
@ -49,7 +49,6 @@ export function ensureSkillsSeeded() {
|
||||
name TEXT NOT NULL,
|
||||
category TEXT NOT NULL,
|
||||
description TEXT,
|
||||
requires_certification INTEGER DEFAULT 0,
|
||||
expires_after INTEGER
|
||||
)
|
||||
`)
|
||||
@ -63,8 +62,8 @@ export function ensureSkillsSeeded() {
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
`)
|
||||
const insertSkill = db.prepare(`
|
||||
INSERT OR IGNORE INTO skills (id, name, category, description, requires_certification, expires_after)
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
INSERT OR IGNORE INTO skills (id, name, category, description, expires_after)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
`)
|
||||
|
||||
let cats = 0, subs = 0, skills = 0
|
||||
@ -87,9 +86,8 @@ export function ensureSkillsSeeded() {
|
||||
for (const sk of (sub.skills || [])) {
|
||||
const sId = `${key}.${sk.id}`
|
||||
const sName = String(sk.name || sk.id)
|
||||
const requires = (catId === 'certifications' || subId === 'weapons') ? 1 : 0
|
||||
const expires = (catId === 'certifications') ? 36 : null
|
||||
insertSkill.run(sId, sName, key, null, requires, expires)
|
||||
insertSkill.run(sId, sName, key, null, expires)
|
||||
skills++
|
||||
}
|
||||
}
|
||||
@ -109,4 +107,3 @@ function cryptoRandomUUID() {
|
||||
return v.toString(16)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -74,9 +74,9 @@ async function syncSkill(action: string, data: any) {
|
||||
switch (action) {
|
||||
case 'create':
|
||||
db.prepare(`
|
||||
INSERT INTO skills (id, name, category, description, requires_certification, expires_after)
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
`).run(data.id, data.name, data.category, data.description || null, data.requiresCertification ? 1 : 0, data.expiresAfter || null)
|
||||
INSERT INTO skills (id, name, category, description, expires_after)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
`).run(data.id, data.name, data.category, data.description || null, data.expiresAfter || null)
|
||||
break
|
||||
case 'update':
|
||||
db.prepare(`
|
||||
|
||||
@ -388,11 +388,11 @@ export class SyncService {
|
||||
switch (action) {
|
||||
case 'create':
|
||||
db.prepare(`
|
||||
INSERT INTO skills (id, name, category, description, requires_certification, expires_after)
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
INSERT INTO skills (id, name, category, description, expires_after)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
`).run(
|
||||
data.id, data.name, data.category, data.description,
|
||||
data.requiresCertification ? 1 : 0, data.expiresAfter
|
||||
data.expiresAfter
|
||||
)
|
||||
break
|
||||
|
||||
@ -570,4 +570,4 @@ export class SyncService {
|
||||
}
|
||||
}
|
||||
|
||||
export const syncService = SyncService.getInstance()
|
||||
export const syncService = SyncService.getInstance()
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren