make mock packages reusable

This commit is contained in:
neil 2022-11-27 18:53:51 +08:00
parent 1cb37a8797
commit acafea3842

View file

@ -6,8 +6,6 @@
* * make cors work with api.tea.xyz/v1
*/
import type { Package } from '../types';
export async function getPackages(): Promise<Package[]> {
const packages: Package[] = [
{
slug: 'mesonbuild_com',
@ -150,5 +148,8 @@ export async function getPackages(): Promise<Package[]> {
installs: 0
}
];
export async function getPackages(): Promise<Package[]> {
return packages;
}