feat: add extensive test suite
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
export async function listFilesService<T>(dependencies: {
|
||||
adminCheck: () => Promise<unknown>;
|
||||
list: () => Promise<T[]>;
|
||||
}) {
|
||||
if (!(await dependencies.adminCheck())) throw "Unauthorized";
|
||||
return dependencies.list();
|
||||
}
|
||||
Reference in New Issue
Block a user