搜索结果列表页面开发
This commit is contained in:
13
src/components/StarBtn/starService.ts
Normal file
13
src/components/StarBtn/starService.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user