mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-08 13:06:46 +00:00
📝 Docs: 商店头像 skeleton (#3362)
This commit is contained in:
@ -31,9 +31,9 @@ export async function fetchRegistryData<T extends RegistryDataType>(
|
||||
throw new Error(`Failed to fetch ${dataType}s: ${e}`);
|
||||
});
|
||||
if (!resp.ok)
|
||||
throw new Error(
|
||||
{throw new Error(
|
||||
`Failed to fetch ${dataType}s: ${resp.status} ${resp.statusText}`
|
||||
);
|
||||
);}
|
||||
const data = (await resp.json()) as RegistryDataResponseTypes[T];
|
||||
return data.map(
|
||||
(resource) => ({ ...resource, resourceType: dataType }) as ResourceTypes[T]
|
||||
|
Reference in New Issue
Block a user