mirror of
https://github.com/strapi/strapi.git
synced 2025-09-20 14:00:48 +00:00
Remove API url origin
This commit is contained in:
parent
09c32d7d8c
commit
b5e6ba0f01
@ -13,7 +13,7 @@ export function* getModels() {
|
||||
cache: 'default',
|
||||
};
|
||||
const response = yield fetch(
|
||||
'http://localhost:1337/content-manager/models',
|
||||
'/content-manager/models',
|
||||
opts
|
||||
);
|
||||
const data = yield response.json();
|
||||
|
@ -23,7 +23,7 @@ export function* getRecord(params) {
|
||||
const currentModelName = yield select(makeSelectCurrentModelName());
|
||||
|
||||
try {
|
||||
const requestUrl = `http://localhost:1337/content-manager/explorer/${currentModelName}/${params.id}`;
|
||||
const requestUrl = `/content-manager/explorer/${currentModelName}/${params.id}`;
|
||||
|
||||
// Call our request helper (see 'utils/request')
|
||||
const data = yield call(request, requestUrl, {
|
||||
@ -45,7 +45,7 @@ export function* editRecord() {
|
||||
const id = isCreating ? '' : recordJSON.id;
|
||||
|
||||
try {
|
||||
const requestUrl = `http://localhost:1337/content-manager/explorer/${currentModelName}/${id}`;
|
||||
const requestUrl = `/content-manager/explorer/${currentModelName}/${id}`;
|
||||
|
||||
// Call our request helper (see 'utils/request')
|
||||
yield call(request, requestUrl, {
|
||||
@ -71,7 +71,7 @@ export function* deleteRecord() {
|
||||
const recordJSON = record.toJSON();
|
||||
|
||||
try {
|
||||
const requestUrl = `http://localhost:1337/content-manager/explorer/${currentModelName}/${recordJSON.id}`;
|
||||
const requestUrl = `/content-manager/explorer/${currentModelName}/${recordJSON.id}`;
|
||||
|
||||
// Call our request helper (see 'utils/request')
|
||||
yield call(request, requestUrl, {
|
||||
|
@ -30,7 +30,7 @@ export function* getRecords() {
|
||||
};
|
||||
|
||||
try {
|
||||
const requestUrl = `http://localhost:1337/content-manager/explorer/${currentModel}`;
|
||||
const requestUrl = `/content-manager/explorer/${currentModel}`;
|
||||
|
||||
// Call our request helper (see 'utils/request')
|
||||
const data = yield call(request, requestUrl, {
|
||||
@ -54,7 +54,7 @@ export function* getCount() {
|
||||
cache: 'default',
|
||||
};
|
||||
const response = yield fetch(
|
||||
`http://localhost:1337/content-manager/explorer/${currentModel}/count`,
|
||||
`/content-manager/explorer/${currentModel}/count`,
|
||||
opts
|
||||
);
|
||||
|
||||
|
@ -30,7 +30,7 @@ export function* getRecords() {
|
||||
};
|
||||
|
||||
try {
|
||||
const requestUrl = `http://localhost:1337/content-manager/explorer/${currentModel}`;
|
||||
const requestUrl = `/content-manager/explorer/${currentModel}`;
|
||||
|
||||
// Call our request helper (see 'utils/request')
|
||||
const data = yield call(request, requestUrl, {
|
||||
@ -54,7 +54,7 @@ export function* getCount() {
|
||||
cache: 'default',
|
||||
};
|
||||
const response = yield fetch(
|
||||
`http://localhost:1337/content-manager/explorer/${currentModel}/count`,
|
||||
`/content-manager/explorer/${currentModel}/count`,
|
||||
opts
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user