feat(backup): add backup scripts workflow
This commit is contained in:
18
server/api/backup-script.get.ts
Normal file
18
server/api/backup-script.get.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import scripts from "../config/backup-script.json"
|
||||
|
||||
type BackupScript = {
|
||||
key: string
|
||||
label: string
|
||||
icon?: string
|
||||
command: string
|
||||
}
|
||||
|
||||
export default defineEventHandler(() => {
|
||||
return {
|
||||
scripts: (scripts as BackupScript[]).map(({ key, label, icon }) => ({
|
||||
key,
|
||||
label,
|
||||
icon: icon || "mdi:play-circle-outline"
|
||||
}))
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user