fix: issues
This commit is contained in:
@@ -2,7 +2,7 @@ import axios from 'axios';
|
||||
|
||||
// Create axios instance with default config
|
||||
const client = axios.create({
|
||||
baseURL: '/',
|
||||
baseURL: '/v1',
|
||||
timeout: 10000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -2,7 +2,7 @@ import client from './client';
|
||||
|
||||
export const postApi = {
|
||||
list({ page = 1, limit = 10, keyword = '' } = {}) {
|
||||
return client.get('/api/posts', {
|
||||
return client.get('/posts', {
|
||||
params: {
|
||||
page,
|
||||
limit,
|
||||
@@ -12,13 +12,13 @@ export const postApi = {
|
||||
},
|
||||
|
||||
play(id) {
|
||||
return client.get(`/api/posts/${id}/play`);
|
||||
return client.get(`/posts/${id}/play`);
|
||||
},
|
||||
show(id) {
|
||||
return client.get(`/api/posts/${id}`);
|
||||
return client.get(`/posts/${id}`);
|
||||
},
|
||||
mine({ page = 1, limit = 10 } = {}) {
|
||||
return client.get('/api/posts/mine', {
|
||||
return client.get('/posts/mine', {
|
||||
params: {
|
||||
page,
|
||||
limit
|
||||
@@ -26,6 +26,6 @@ export const postApi = {
|
||||
});
|
||||
},
|
||||
buy(id) {
|
||||
return client.post(`/api/posts/buy/${id}`);
|
||||
return client.post(`/posts/buy/${id}`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user