Skip to content

Commit

Permalink
Added additional validation of post publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
dkildar committed Nov 15, 2024
1 parent 779db5a commit 0f8b9db
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/submit/_api/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
isCommunity,
makeApp,
makeCommentOptions,
makeEntryPath,
tempEntry
} from "@/utils";
import appPackage from "../../../../package.json";
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0f8b9db

Please sign in to comment.