Add LoRA activation words and hide LoRAs that do not match the current engine.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { libraryOwnerKey, publicLibrary, setLoraTrigger } from '~/server/utils/library'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const body = await readBody<{ key?: unknown; trigger?: unknown }>(event)
|
||||
const owner = libraryOwnerKey(event)
|
||||
await setLoraTrigger(owner, String(body?.key || ''), String(body?.trigger || ''))
|
||||
return publicLibrary(event)
|
||||
})
|
||||
Reference in New Issue
Block a user