Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
intrn(tag): make enhancer for creation
Browse files Browse the repository at this point in the history
  • Loading branch information
lemredd committed Nov 6, 2022
1 parent a9f76dd commit b71a52a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
24 changes: 24 additions & 0 deletions routes/enhancer/tag/create.get.ts
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"
}
}
}
4 changes: 3 additions & 1 deletion routes/enhancer/tag/router.ts
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
]

0 comments on commit b71a52a

Please sign in to comment.