mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
fix: allow admins to edit miis in api route
also fix build errors from last commit (don't trust `pnpm lint`)
This commit is contained in:
parent
2d82be8453
commit
783c5161c0
2 changed files with 4 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ export default function EditForm({ mii, likes }: Props) {
|
|||
const formData = new FormData();
|
||||
if (name != mii.name) formData.append("name", name);
|
||||
if (tags != mii.tags) formData.append("tags", JSON.stringify(tags));
|
||||
if (description != mii.description) formData.append("description", description);
|
||||
if (description && description != mii.description) formData.append("description", description);
|
||||
|
||||
if (hasFilesChanged.current) {
|
||||
files.forEach((file, index) => {
|
||||
|
|
@ -184,7 +184,7 @@ export default function EditForm({ mii, likes }: Props) {
|
|||
maxLength={256}
|
||||
placeholder="(optional) Type a description..."
|
||||
className="pill input !rounded-xl resize-none col-span-2"
|
||||
value={description}
|
||||
value={description ?? ""}
|
||||
onChange={(e) => setDescription(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue