mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-21 04:01:10 +10:00
partial: annotate rest of admin routes
This commit is contained in:
@ -8,6 +8,9 @@ const DeleteLibrarySource = type({
|
||||
id: "string",
|
||||
}).configure(throwingArktype);
|
||||
|
||||
/**
|
||||
* Delete a given library source
|
||||
*/
|
||||
export default defineEventHandler<{ body: typeof DeleteLibrarySource.infer }>(
|
||||
async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, [
|
||||
|
||||
@ -4,6 +4,9 @@ import libraryManager from "~/server/internal/library";
|
||||
|
||||
export type WorkingLibrarySource = LibraryModel & { working: boolean };
|
||||
|
||||
/**
|
||||
* Fetch all library sources on this instance
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, [
|
||||
"library:sources:read",
|
||||
|
||||
@ -12,6 +12,9 @@ const UpdateLibrarySource = type({
|
||||
options: "object",
|
||||
}).configure(throwingArktype);
|
||||
|
||||
/**
|
||||
* Update a library source's options. Validates options and live-updates the source.
|
||||
*/
|
||||
export default defineEventHandler<{ body: typeof UpdateLibrarySource.infer }>(
|
||||
async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, [
|
||||
|
||||
@ -14,6 +14,9 @@ const CreateLibrarySource = type({
|
||||
options: "object",
|
||||
}).configure(throwingArktype);
|
||||
|
||||
/**
|
||||
* Create a new library source with options
|
||||
*/
|
||||
export default defineEventHandler<{ body: typeof CreateLibrarySource.infer }>(
|
||||
async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, [
|
||||
|
||||
Reference in New Issue
Block a user