This repository has been archived on 2020-08-13. You can view files and clone it, but cannot push or open issues or pull requests.
requestor/lib/DatabaseCrudOptions.ts
2020-05-02 21:48:22 +02:00

18 lines
498 B
TypeScript

import { Request, Response } from 'express';
type Authorization = {
(req: Request, res: Response): Promise<boolean>;
(req: Request, res: Response, next: Function): unknown;
}
interface DatabaseCrudOptions {
general_authorization?: Authorization;
create_authorization?: Authorization;
read_authorization?: Authorization;
update_authorization?: Authorization;
delete_authorization?: Authorization;
optional_columns?: Array<string>;
}
export { Authorization, DatabaseCrudOptions };