mirror of https://gitee.com/answerdev/answer.git
fix: answer the author's conditional judgement
This commit is contained in:
parent
487b454165
commit
888e873a7c
|
@ -80,7 +80,10 @@ const Index = () => {
|
|||
res.list = res.list?.filter((v) => {
|
||||
// delete answers pnly show to author and admin and has searchparams aid
|
||||
if (v.status === 10) {
|
||||
if ((isAuthor || isAdmin) && aid === v.id) {
|
||||
if (
|
||||
(v?.user_info.username === userInfo?.username || isAdmin) &&
|
||||
aid === v.id
|
||||
) {
|
||||
return v;
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue