фикс
This commit is contained in:
parent
33e5af4076
commit
26380ecc90
@ -158,7 +158,7 @@ export default {
|
||||
// На бэкенде такого маршрута может не быть, поэтому используем маршрут для получения списка диалогов
|
||||
// и фильтруем результаты на клиенте
|
||||
const response = await axios.get(
|
||||
`${import.meta.env.VITE_API_URL}/api/admin/conversations`,
|
||||
`/api/admin/conversations`,
|
||||
{
|
||||
params: { userId: props.id, limit: 1 }, // Временное решение, по API нужно реализовать маршрут GET /api/admin/conversations/:id
|
||||
headers: {
|
||||
@ -196,7 +196,7 @@ export default {
|
||||
try {
|
||||
const token = localStorage.getItem('token');
|
||||
const response = await axios.get(
|
||||
`${import.meta.env.VITE_API_URL}/api/admin/conversations/${conversation.value._id}/messages`,
|
||||
`/api/admin/conversations/${conversation.value._id}/messages`,
|
||||
{
|
||||
params: {
|
||||
page: currentPage.value,
|
||||
|
@ -120,7 +120,7 @@ export default {
|
||||
}
|
||||
|
||||
const token = localStorage.getItem('token');
|
||||
const response = await axios.get(`${import.meta.env.VITE_API_URL}/api/admin/conversations`, {
|
||||
const response = await axios.get(`/api/admin/conversations`, {
|
||||
params,
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`
|
||||
|
@ -143,7 +143,7 @@ export default {
|
||||
try {
|
||||
const token = localStorage.getItem('token');
|
||||
const response = await axios.get(
|
||||
`${import.meta.env.VITE_API_URL}/api/admin/statistics`,
|
||||
`/api/admin/statistics`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`
|
||||
|
@ -173,7 +173,7 @@ export default {
|
||||
try {
|
||||
const token = localStorage.getItem('token');
|
||||
const response = await axios.get(
|
||||
`${import.meta.env.VITE_API_URL}/api/admin/users/${props.id}`,
|
||||
`/api/admin/users/${props.id}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`
|
||||
@ -202,7 +202,7 @@ export default {
|
||||
|
||||
const token = localStorage.getItem('token');
|
||||
const response = await axios.put(
|
||||
`${import.meta.env.VITE_API_URL}/api/admin/users/${props.id}/toggle-active`,
|
||||
`/api/admin/users/${props.id}/toggle-active`,
|
||||
{},
|
||||
{
|
||||
headers: {
|
||||
|
@ -145,7 +145,7 @@ export default {
|
||||
}
|
||||
|
||||
const token = localStorage.getItem('token');
|
||||
const response = await axios.get(`${import.meta.env.VITE_API_URL}/api/admin/users`, {
|
||||
const response = await axios.get(`/api/admin/users`, {
|
||||
params,
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`
|
||||
@ -193,7 +193,7 @@ export default {
|
||||
|
||||
const token = localStorage.getItem('token');
|
||||
const response = await axios.put(
|
||||
`${import.meta.env.VITE_API_URL}/api/admin/users/${userId}/toggle-active`,
|
||||
`/api/admin/users/${userId}/toggle-active`,
|
||||
{},
|
||||
{
|
||||
headers: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user