Correct wrong field name
This commit is contained in:
parent
73603ca317
commit
be6413aed8
2 changed files with 3 additions and 4 deletions
|
@ -29,7 +29,7 @@ const POST = z.object({
|
|||
const Panel = () => {
|
||||
const [posts, setPosts] = useState<z.infer<typeof POST>[]>([])
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [verifyli, setVerifyli] = useState<{ id: number, ck: Boolean }[]>([])
|
||||
const [verifyli, setVerifyli] = useState<{ post: number, check: Boolean }[]>([])
|
||||
const load = () => {
|
||||
setLoading(true)
|
||||
fetch(rootstr + "/api/admin/fetch_post", { credentials: "include" }).then(async val => {
|
||||
|
|
|
@ -2,7 +2,6 @@ package handlers
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"image/png"
|
||||
"log"
|
||||
|
@ -187,7 +186,7 @@ func AdminVerify(c *fiber.Ctx) error {
|
|||
if post_verify.Check {
|
||||
_, err = qtx.AdminVerify(ctx, nimdb.AdminVerifyParams{ID: post_verify.Id, Phase: nimdb.PostPhaseOk})
|
||||
if err != nil {
|
||||
log.Println(err.Error())
|
||||
log.Println(err.Error(), post_verify.Id)
|
||||
return c.SendStatus(fiber.StatusBadRequest)
|
||||
}
|
||||
|
||||
|
@ -214,7 +213,7 @@ func AdminVerify(c *fiber.Ctx) error {
|
|||
if post_verify.Check {
|
||||
_, err = qtx.SuperAdminVerify(ctx, nimdb.SuperAdminVerifyParams{ID: post_verify.Id, Phase: nimdb.PostPhaseOk})
|
||||
if err != nil {
|
||||
log.Println(err.Error())
|
||||
log.Println(err.Error(), post_verify.Id)
|
||||
return c.SendStatus(fiber.StatusBadRequest)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue