feat(cms): improve catalog, editorial recovery and operations
This commit is contained in:
1 parent
2fead134e6
commit
c389c3893d
122 files changed
+8137
-703
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { createHash } from "node:crypto";
|
||||
export function articleEditToken(article: {
|
||||
title: string;
|
||||
slug: string;
|
||||
image: string;
|
||||
shortStory: string;
|
||||
fullStory: string;
|
||||
status: string;
|
||||
publishAt: Date | null;
|
||||
}) {
|
||||
return createHash("sha256")
|
||||
.update(
|
||||
JSON.stringify([
|
||||
article.title,
|
||||
article.slug,
|
||||
article.image,
|
||||
article.shortStory,
|
||||
article.fullStory,
|
||||
article.status,
|
||||
article.publishAt?.toISOString() ?? "",
|
||||
]),
|
||||
)
|
||||
.digest("hex");
|
||||
}
|
||||
Reference in new issue
Block a user