This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
generated from KennethTrecy/web_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
intrn(tag): make enhancer for creation
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { DocumentProps } from "$/types/server" | ||
|
||
import Policy from "!/bases/policy" | ||
import { CREATE } from "$/permissions/tag_combinations" | ||
import PageMiddleware from "!/bases/controller-likes/page_middleware" | ||
import { tag as permissionGroup } from "$/permissions/permission_list" | ||
import PermissionBasedPolicy from "!/policies/permission-based" | ||
|
||
export default class extends PageMiddleware { | ||
get filePath(): string { return __filename } | ||
|
||
get policy(): Policy { | ||
return new PermissionBasedPolicy(permissionGroup, [ | ||
CREATE | ||
]) | ||
} | ||
|
||
getDocumentProps(): DocumentProps { | ||
return { | ||
"description": "Consultation chat platform for MCC", | ||
"title": "Create Tag | Talakutnangan" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import GetList from "!%/enhancer/role/list.get" | ||
import GetCreate from "!%/enhancer/role/create.get" | ||
|
||
|
||
export const controllers = [ | ||
GetList | ||
GetList, | ||
GetCreate | ||
] |