rename tree endpoint to entities
This commit is contained in:
@@ -28,7 +28,7 @@ export class UmbTreeContentContext implements UmbTreeContext {
|
||||
|
||||
public fetchChildren(key: string) {
|
||||
// TODO: figure out url structure
|
||||
fetch(`/umbraco/backoffice/trees/node/${key}`)
|
||||
fetch(`/umbraco/backoffice/entities/node/${key}`)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
this.entityStore.update(data);
|
||||
|
||||
@@ -29,7 +29,7 @@ export class UmbTreeDataTypesContext implements UmbTreeContext {
|
||||
|
||||
public fetchChildren(key: string) {
|
||||
// TODO: figure out url structure
|
||||
fetch(`/umbraco/backoffice/trees/data-types/${key}`)
|
||||
fetch(`/umbraco/backoffice/entities/data-types/${key}`)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
this.entityStore.update(data);
|
||||
|
||||
@@ -28,7 +28,7 @@ export class UmbTreeDocumentTypesContext implements UmbTreeContext {
|
||||
|
||||
public fetchChildren(key: string) {
|
||||
// TODO: figure out url structure
|
||||
fetch(`/umbraco/backoffice/trees/document-types/${key}`)
|
||||
fetch(`/umbraco/backoffice/entities/document-types/${key}`)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
this.entityStore.update(data);
|
||||
|
||||
@@ -28,7 +28,7 @@ export class UmbTreeMediaContext implements UmbTreeContext {
|
||||
|
||||
public fetchChildren(key: string) {
|
||||
// TODO: figure out url structure
|
||||
fetch(`/umbraco/backoffice/trees/node/${key}`)
|
||||
fetch(`/umbraco/backoffice/entities/node/${key}`)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
this.entityStore.update(data);
|
||||
|
||||
@@ -29,7 +29,7 @@ export class UmbTreeMemberGroupsContext implements UmbTreeContext {
|
||||
|
||||
public fetchChildren(key: string) {
|
||||
// TODO: figure out url structure
|
||||
fetch(`/umbraco/backoffice/trees/member-groups/${key}`)
|
||||
fetch(`/umbraco/backoffice/entities/member-groups/${key}`)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
this.entityStore.update(data);
|
||||
|
||||
@@ -28,7 +28,7 @@ export class UmbTreeMembersContext implements UmbTreeContext {
|
||||
|
||||
public fetchChildren(key: string) {
|
||||
// TODO: figure out url structure
|
||||
fetch(`/umbraco/backoffice/trees/members/${key}`)
|
||||
fetch(`/umbraco/backoffice/entities/members/${key}`)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
this.entityStore.update(data);
|
||||
|
||||
@@ -6,7 +6,7 @@ import * as manifestsHandlers from './domains/manifests.handlers';
|
||||
import * as serverHandlers from './domains/server.handlers';
|
||||
import { handlers as upgradeHandlers } from './domains/upgrade.handlers';
|
||||
import { handlers as userHandlers } from './domains/user.handlers';
|
||||
import { handlers as treeHandlers } from './domains/tree.handlers';
|
||||
import { handlers as treeHandlers } from './domains/entity.handlers';
|
||||
|
||||
const handlers = [
|
||||
serverHandlers.serverVersionHandler,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { umbEntityData } from '../data/entity.data';
|
||||
|
||||
// TODO: add schema
|
||||
export const handlers = [
|
||||
rest.get('/umbraco/backoffice/trees/members/:key', (req, res, ctx) => {
|
||||
rest.get('/umbraco/backoffice/entities/members/:key', (req, res, ctx) => {
|
||||
console.warn('Please move to schema');
|
||||
const key = req.params.key as string;
|
||||
if (!key) return;
|
||||
@@ -12,7 +12,7 @@ export const handlers = [
|
||||
return res(ctx.status(200), ctx.json(entities));
|
||||
}),
|
||||
|
||||
rest.get('/umbraco/backoffice/trees/member-groups/:key', (req, res, ctx) => {
|
||||
rest.get('/umbraco/backoffice/entities/member-groups/:key', (req, res, ctx) => {
|
||||
console.warn('Please move to schema');
|
||||
const key = req.params.key as string;
|
||||
if (!key) return;
|
||||
@@ -21,7 +21,7 @@ export const handlers = [
|
||||
return res(ctx.status(200), ctx.json(entities));
|
||||
}),
|
||||
|
||||
rest.get('/umbraco/backoffice/trees/data-types/:key', (req, res, ctx) => {
|
||||
rest.get('/umbraco/backoffice/entities/data-types/:key', (req, res, ctx) => {
|
||||
console.warn('Please move to schema');
|
||||
const key = req.params.key as string;
|
||||
if (!key) return;
|
||||
@@ -30,7 +30,7 @@ export const handlers = [
|
||||
return res(ctx.status(200), ctx.json(entities));
|
||||
}),
|
||||
|
||||
rest.get('/umbraco/backoffice/trees/document-types/:key', (req, res, ctx) => {
|
||||
rest.get('/umbraco/backoffice/entities/document-types/:key', (req, res, ctx) => {
|
||||
console.warn('Please move to schema');
|
||||
const key = req.params.key as string;
|
||||
if (!key) return;
|
||||
@@ -39,7 +39,7 @@ export const handlers = [
|
||||
return res(ctx.status(200), ctx.json(entities));
|
||||
}),
|
||||
|
||||
rest.get('/umbraco/backoffice/trees/node/:key', (req, res, ctx) => {
|
||||
rest.get('/umbraco/backoffice/entities/node/:key', (req, res, ctx) => {
|
||||
console.warn('Please move to schema');
|
||||
const key = req.params.key as string;
|
||||
if (!key) return;
|
||||
Reference in New Issue
Block a user