Skip to content

Commit

Permalink
Merge branch 'manawiki:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
pogseal authored Jul 31, 2024
2 parents ecd314c + 6fe522e commit 56fe50e
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions scripts/resaveCollection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Payload from "payload";

import { manaSlug } from "../app/utils/url-slug";

require("dotenv").config();

const { PAYLOADCMS_SECRET } = process.env;
Expand Down Expand Up @@ -36,17 +38,12 @@ const resaveCollection = async () => {
const { id } = result;
if (collectionSlug) {
try {
await payload.create({
collection: "search",
await payload.update({
collection: collectionSlug,
id,
data: {
name: result.name,
icon: result.icon.id,
priority: 9,
doc: {
relationTo: collectionSlug,
value: id,
},
updatedAt: new Date(),
// slug: manaSlug(result.name),
},
});
console.log(
Expand Down

0 comments on commit 56fe50e

Please sign in to comment.