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

Commit

Permalink
intrn(tag): ensure tags has no posts
Browse files Browse the repository at this point in the history
Co-authored-by: Kenneth Trecy Tobias <19201.tobias.kennethtrecy.c@gmail.com>
  • Loading branch information
lemredd and KennethTrecy committed Nov 6, 2022
1 parent 9dbb4f1 commit 640e3f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion routes/api/tag/archive.delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import {
} from "$/permissions/tag_combinations"

import exists from "!/validators/manager/exists"
import hasNoOtherPosts from "!/validators/manager/has_no_other_posts"
import makeResourceIdentifierListDocumentRules
from "!/rule_sets/make_resource_identifier_list_document"


export default class extends JSONController {
get filePath(): string { return __filename }

Expand All @@ -29,7 +31,10 @@ export default class extends JSONController {
return makeResourceIdentifierListDocumentRules(
"tag",
exists,
Manager
Manager,
{
"postIDRules": { "pipes": [ hasNoOtherPosts ] }
}
)
}

Expand Down

0 comments on commit 640e3f7

Please sign in to comment.