mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +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 />
|
||||
|
||||
<table>
|
||||
<th>foo</th>
|
||||
<th>bar</th>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>foo</th>
|
||||
<th>bar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<td>pizza</td>
|
||||
<td>apple</td>
|
||||
<tr>
|
||||
<td>pizza</td>
|
||||
<td>apple</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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].owners = JSON.parse(res[0].owners)
|
||||
res[0].vanity = ((res[0].trusted || res[0].partnered) && res[0].vanity) ?? null
|
||||
if (owners)
|
||||
res[0].owners = await Promise.all(
|
||||
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 }))
|
||||
}
|
||||
if (owners)
|
||||
res[0].owners = await Promise.all(
|
||||
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 }))
|
||||
|
||||
return res[0] ?? null
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user