mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
fix: Cannot subscribe in prod (#11931)
This commit is contained in:
@@ -44,6 +44,7 @@ import { Week } from "@shared/utils/time";
|
||||
import type UserMembership from "~/models/UserMembership";
|
||||
import { client } from "~/utils/ApiClient";
|
||||
import DocumentDelete from "~/scenes/DocumentDelete";
|
||||
import { ProsemirrorHelper } from "~/models/helpers/ProsemirrorHelper";
|
||||
import DocumentPermanentDelete from "~/scenes/DocumentPermanentDelete";
|
||||
import DocumentPublish from "~/scenes/DocumentPublish";
|
||||
import DeleteDocumentsInTrash from "~/scenes/Trash/components/DeleteDocumentsInTrash";
|
||||
@@ -737,8 +738,6 @@ export const copyDocumentAsPlainText = createAction({
|
||||
? stores.documents.get(activeDocumentId)
|
||||
: undefined;
|
||||
if (document) {
|
||||
const { ProsemirrorHelper } =
|
||||
await import("~/models/helpers/ProsemirrorHelper");
|
||||
copy(ProsemirrorHelper.toPlainText(document));
|
||||
toast.success(t("Text copied to clipboard"));
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
settingsPath,
|
||||
urlify,
|
||||
} from "~/utils/routeHelpers";
|
||||
import { ProsemirrorHelper } from "~/models/helpers/ProsemirrorHelper";
|
||||
import { ActiveTemplateSection, TemplateSection } from "../sections";
|
||||
import Template from "~/models/Template";
|
||||
import { AvatarSize } from "~/components/Avatar";
|
||||
@@ -200,8 +201,6 @@ export const copyTemplateAsPlainText = createAction({
|
||||
perform: async ({ getActiveModel, t }) => {
|
||||
const template = getActiveModel(Template);
|
||||
if (template) {
|
||||
const { ProsemirrorHelper } =
|
||||
await import("~/models/helpers/ProsemirrorHelper");
|
||||
copy(ProsemirrorHelper.toPlainText(template));
|
||||
toast.success(t("Text copied to clipboard"));
|
||||
}
|
||||
|
||||
@@ -443,9 +443,13 @@ router.post(
|
||||
async (ctx: APIContext<T.SharesSubscribeReq>) => {
|
||||
const { shareId, email } = ctx.input.body;
|
||||
const { transaction } = ctx.state;
|
||||
const team = await getTeamFromContext(ctx, { includeStateCookie: false });
|
||||
|
||||
// Validate the share exists and is published
|
||||
const { share, document } = await loadPublicShare({ id: shareId });
|
||||
const { share, document } = await loadPublicShare({
|
||||
id: shareId,
|
||||
teamId: team?.id,
|
||||
});
|
||||
|
||||
if (!share.allowSubscriptions) {
|
||||
throw InvalidRequestError("Subscriptions are not enabled for this share");
|
||||
|
||||
Reference in New Issue
Block a user