Skip to content

Commit de8427e

Browse files
committedSep 5, 2022
fix: API
1 parent adc020a commit de8427e

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed
 

‎GZCTF/ClientApp/src/pages/posts/[postId]/edit.tsx

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FC, useEffect, useState } from 'react'
22
import { useParams, useNavigate } from 'react-router'
3-
import { Group, Stack, TextInput, Text, Title } from '@mantine/core'
3+
import { Stack, TextInput, Title, Textarea, MultiSelect } from '@mantine/core'
44
import StickyHeader from '@Components/StickyHeader'
55
import WithNavBar from '@Components/WithNavbar'
66
import api, { PostEditModel } from '@Api'
@@ -54,6 +54,22 @@ const PostEdit: FC = () => {
5454
value={post.title}
5555
onChange={(e) => setPost({ ...post, title: e.currentTarget.value })}
5656
/>
57+
<TextInput
58+
label="文章摘要"
59+
value={post.summary}
60+
onChange={(e) => setPost({ ...post, summary: e.currentTarget.value })}
61+
/>
62+
<MultiSelect
63+
label="文章标签"
64+
data={[]}
65+
/>
66+
<Textarea
67+
label="文章内容"
68+
value={post.content}
69+
onChange={(e) => setPost({ ...post, content: e.currentTarget.value })}
70+
minRows={20}
71+
maxRows={20}
72+
/>
5773
</Stack>
5874
</WithNavBar>
5975
)

‎GZCTF/Controllers/EditController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public async Task<IActionResult> UpdateGame([FromRoute] int id, [FromBody] GameI
241241
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
242242
[ProducesResponseType(typeof(RequestResponse), StatusCodes.Status400BadRequest)]
243243
[ProducesResponseType(typeof(RequestResponse), StatusCodes.Status404NotFound)]
244-
public async Task<IActionResult> UpdateGameNoticeer([FromRoute] int id, IFormFile file, CancellationToken token)
244+
public async Task<IActionResult> UpdateGamePoster([FromRoute] int id, IFormFile file, CancellationToken token)
245245
{
246246
if (file.Length == 0)
247247
return BadRequest(new RequestResponse("文件非法"));

0 commit comments

Comments
 (0)
Please sign in to comment.