Skip to content

Commit

Permalink
Merge pull request #175 from ecency/bugfix/174-404-after-publishing-s…
Browse files Browse the repository at this point in the history
…till-happens

Added additional validation of post publishing
  • Loading branch information
feruzm authored Nov 16, 2024
2 parents 779db5a + 0f8b9db commit 5e5be46
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 5e5be46

Please sign in to comment.