import request from '@/utils/request' ; import { Github } from '@root/src/models/github' ; export const addGithub = ( params ) => { return request . post < ResponseData < Github > > ( '/github' , params ) ; } ; export const getRepoInfoByGithub = ( id ) => { return request . get < ResponseData < AnyObject > > ( `/github/repo/${ id }` ) ; } ; export const getGithubs = ( params = { } ) => { return request . get < ResponseList < Github > > ( '/githubs' , params ) ; } ; export const updateGithub = ( id , params ) => { return request . put < ResponseData < Github > > ( `/github/${ id }` , params ) ; } ; export const deleteGithub = ( id ) => { return request . delete < ResponseData < Github > > ( `/github/${ id }` ) ; } ; export const sortGithubs = ( params ) => { return request . put < ResponseData < Github > > ( `/githubs/sort` , params ) ; } ;