forked from Gitlink/forgeplus-react
30 lines
941 B
JavaScript
30 lines
941 B
JavaScript
import axios from 'axios';
|
|
import { url } from '../../config/ssrUrl';
|
|
|
|
const baseUrl = `${url}/api`
|
|
|
|
//
|
|
export async function getProjectFunc (owner, projectsId) {
|
|
const url = `${baseUrl}/${owner}/${projectsId}/simple.json`;
|
|
return axios.get(url);
|
|
}
|
|
|
|
export async function getProjectDetailFunc (owner, projectsId) {
|
|
const url = `${baseUrl}/${owner}/${projectsId}/detail.json`;
|
|
return axios.get(url);
|
|
}
|
|
|
|
export async function getProjectEntriesFunc (owner, projectsId, branch) {
|
|
const url = `${baseUrl}/${owner}/${projectsId}/entries.json`;
|
|
return axios.get(url, {params: { ref: branch }});
|
|
}
|
|
|
|
export async function getBannerFunc (owner, projectsId) {
|
|
const url = `${baseUrl}/${owner}/${projectsId}/menu_list.json`;
|
|
return axios.get(url);
|
|
}
|
|
|
|
export async function getProjectReadMe (owner, projectsId, branch) {
|
|
const url = `${baseUrl}/${owner}/${projectsId}/readme.json`;
|
|
return axios.get(url, {params: { ref: branch }});
|
|
} |