chore: fix dispatch memo pinned (#1152)

This commit is contained in:
boojack 2023-02-25 00:13:41 +08:00 committed by GitHub
parent 6e2e7ac782
commit d6e4b5e889
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -275,10 +275,7 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
{type === "OAUTH2" && ( {type === "OAUTH2" && (
<> <>
{isCreating && ( {isCreating && (
<p className="border rounded-md p-2 text-sm w-full mb-2 break-all"> <p className="border rounded-md p-2 text-sm w-full mb-2 break-all">Redirect URL: {absolutifyLink("/auth/callback")}</p>
Redirect URL: {absolutifyLink("/auth/callback")}{" "}
RedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirect
</p>
)} )}
<Typography className="!mb-1" level="body2"> <Typography className="!mb-1" level="body2">
Client ID<span className="text-red-600">*</span> Client ID<span className="text-red-600">*</span>

View File

@ -1,4 +1,4 @@
import { uniqBy } from "lodash-es"; import { omit, uniqBy } from "lodash-es";
import * as api from "../../helpers/api"; import * as api from "../../helpers/api";
import { DEFAULT_MEMO_LIMIT } from "../../helpers/consts"; import { DEFAULT_MEMO_LIMIT } from "../../helpers/consts";
import { useUserStore } from "./"; import { useUserStore } from "./";
@ -97,7 +97,7 @@ export const useMemoStore = () => {
patchMemo: async (memoPatch: MemoPatch): Promise<Memo> => { patchMemo: async (memoPatch: MemoPatch): Promise<Memo> => {
const { data } = (await api.patchMemo(memoPatch)).data; const { data } = (await api.patchMemo(memoPatch)).data;
const memo = convertResponseModelMemo(data); const memo = convertResponseModelMemo(data);
store.dispatch(patchMemo(memo)); store.dispatch(patchMemo(omit(memo, "pinned")));
return memo; return memo;
}, },
pinMemo: async (memoId: MemoId) => { pinMemo: async (memoId: MemoId) => {