From 0f8b9db32f4ff854475c4d140e5195d292fafd1f Mon Sep 17 00:00:00 2001 From: "ildar.timerbaev" Date: Fri, 15 Nov 2024 23:03:15 +0300 Subject: [PATCH] Added additional validation of post publishing --- src/app/submit/_api/publish.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/submit/_api/publish.ts b/src/app/submit/_api/publish.ts index db900694b..39fef8a7b 100644 --- a/src/app/submit/_api/publish.ts +++ b/src/app/submit/_api/publish.ts @@ -17,7 +17,6 @@ import { isCommunity, makeApp, makeCommentOptions, - makeEntryPath, tempEntry } from "@/utils"; import appPackage from "../../../../package.json"; @@ -178,13 +177,12 @@ export function usePublishApi(onClear: () => void) { }; updateEntryQueryData([entry]); - await validatePostCreating(entry.author, entry.permlink); + await validatePostCreating(entry.author, entry.permlink, 3); success(i18next.t("submit.published")); onClear(); clearActivePoll(); - const newLoc = makeEntryPath(parentPermlink, author, permlink); - router.push(newLoc); + router.push(`@${activeUser.username}/posts`); //Mark speak video as published if (!!unpublished3SpeakVideo && activeUser.username === unpublished3SpeakVideo.owner) {