chore: fix memos amount

This commit is contained in:
boojack
2022-07-05 22:09:11 +08:00
parent 592e037f21
commit 0e8d3e6907
5 changed files with 26 additions and 30 deletions

View File

@ -19,7 +19,7 @@ interface Props {}
const MyAccountSection: React.FC<Props> = () => {
const user = useAppSelector((state) => state.user.user as User);
const [username, setUsername] = useState<string>(user.name);
const openAPIRoute = `${window.location.origin}/h/${user.openId}/memo`;
const openAPIRoute = `${window.location.origin}/api/memo?openId=${user.openId}`;
const handleUsernameChanged = (e: React.ChangeEvent<HTMLInputElement>) => {
const nextUsername = e.target.value as string;
@ -100,7 +100,7 @@ const MyAccountSection: React.FC<Props> = () => {
</span>
<div className="usage-guide-container">
<p className="title-text">Usage guide:</p>
<pre>{`POST ${openAPIRoute}\nContent-type: application/json\n{\n "content": "Hello, #memos ${window.location.origin}"\n}`}</pre>
<pre>{`POST ${openAPIRoute}\nContent-type: application/json\n{\n "content": "Hello #memos from ${window.location.origin}"\n}`}</pre>
</div>
</div>
</>