14 lines
374 B
TypeScript
14 lines
374 B
TypeScript
import type { IStarOriginSource } from '@/components/StarBtn/types';
|
|
import { starRepo, unstarRepo } from '@/api/repo';
|
|
|
|
export function starInterface(repoId: string): IStarOriginSource {
|
|
return {
|
|
async unStar() {
|
|
return unstarRepo({ repoId }).then(res => res.data);
|
|
},
|
|
async star() {
|
|
return starRepo({ repoId }).then(res => res.data);
|
|
}
|
|
}
|
|
}
|