mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
- Added functions to set, update, delete, and retrieve page configurations. - Introduced model schema management with functions for adding, updating, deleting, and retrieving schemas. - Implemented tenant management with functions for adding, updating, deleting, and retrieving tenants. - Created user management functions for adding, updating, deleting, and retrieving users. - Developed workflow management functions for adding, updating, deleting, and retrieving workflows. - Added SMTP configuration management with functions to get and set SMTP configurations. - Implemented functions for managing god credentials, including expiry management and first login flags. - Introduced power transfer request management with functions for adding, updating, deleting, and retrieving requests. - Added Lua snippet management functions for retrieving snippets by ID and category, and searching snippets.
19 lines
497 B
TypeScript
19 lines
497 B
TypeScript
import { prisma } from '../../prisma'
|
|
import type { LuaScript } from '../../../types/level-types'
|
|
|
|
/**
|
|
* Get all Lua scripts
|
|
* @returns Array of Lua scripts
|
|
*/
|
|
export const getLuaScripts = async (): Promise<LuaScript[]> => {
|
|
const scripts = await prisma.luaScript.findMany()
|
|
return scripts.map(s => ({
|
|
id: s.id,
|
|
name: s.name,
|
|
description: s.description || undefined,
|
|
code: s.code,
|
|
parameters: JSON.parse(s.parameters),
|
|
returnType: s.returnType || undefined,
|
|
}))
|
|
}
|