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

18 lines
498 B
TypeScript
Raw Normal View History

2020-04-16 11:09:04 +02:00
import { Request, Response } from 'express';
2020-04-17 11:03:15 +02:00
type Authorization = {
2020-04-17 08:31:14 +02:00
(req: Request, res: Response): Promise<boolean>;
2020-04-17 11:27:56 +02:00
(req: Request, res: Response, next: Function): unknown;
2020-04-16 11:09:04 +02:00
}
2020-04-23 18:58:06 +02:00
interface DatabaseCrudOptions {
2020-04-22 22:11:19 +02:00
general_authorization?: Authorization;
create_authorization?: Authorization;
read_authorization?: Authorization;
update_authorization?: Authorization;
delete_authorization?: Authorization;
optional_columns?: Array<string>;
2020-04-16 11:09:04 +02:00
}
2020-04-23 18:58:06 +02:00
export { Authorization, DatabaseCrudOptions };