Files
Situation-Awareness-Platfor…/src/components/StarBtn/starService.ts

14 lines
374 B
TypeScript
Raw Normal View History

2025-03-12 18:41:20 +08:00
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);
}
}
}