mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
style: fixed some deepscan warnings
This commit is contained in:
parent
1a1eeb2b44
commit
8edaac1373
@ -183,11 +183,17 @@ const Bots: NextPage<BotsProps> = ({ data, date }) => {
|
|||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
<th>foo</th>
|
<th>foo</th>
|
||||||
<th>bar</th>
|
<th>bar</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>pizza</td>
|
<td>pizza</td>
|
||||||
<td>apple</td>
|
<td>apple</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<ul className='list-disc'>
|
<ul className='list-disc'>
|
||||||
|
|||||||
@ -48,12 +48,12 @@ async function getBot(id: string, owners=true) {
|
|||||||
res[0].category = JSON.parse(res[0].category)
|
res[0].category = JSON.parse(res[0].category)
|
||||||
res[0].owners = JSON.parse(res[0].owners)
|
res[0].owners = JSON.parse(res[0].owners)
|
||||||
res[0].vanity = ((res[0].trusted || res[0].partnered) && res[0].vanity) ?? null
|
res[0].vanity = ((res[0].trusted || res[0].partnered) && res[0].vanity) ?? null
|
||||||
}
|
|
||||||
if (owners)
|
if (owners)
|
||||||
res[0].owners = await Promise.all(
|
res[0].owners = await Promise.all(
|
||||||
res[0].owners.map(async (u: string) => await get._rawUser.load(u))
|
res[0].owners.map(async (u: string) => await get._rawUser.load(u))
|
||||||
)
|
)
|
||||||
res[0].owners = res[0].owners.filter((el: User | null) => el).map((row: User) => ({ ...row }))
|
res[0].owners = res[0].owners.filter((el: User | null) => el).map((row: User) => ({ ...row }))
|
||||||
|
}
|
||||||
|
|
||||||
return res[0] ?? null
|
return res[0] ?? null
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user