rename content handlers to node handlers
This commit is contained in:
@@ -7,7 +7,7 @@ export class UmbNodeStore {
|
||||
|
||||
getByKey(key: string): Observable<NodeEntity | null> {
|
||||
// fetch from server and update store
|
||||
fetch(`/umbraco/backoffice/content/${key}`)
|
||||
fetch(`/umbraco/backoffice/node/${key}`)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
this._updateStore(data);
|
||||
@@ -40,7 +40,7 @@ export class UmbNodeStore {
|
||||
}
|
||||
|
||||
// TODO: Use node type to hit the right API, or have a general Node API?
|
||||
return fetch('/umbraco/backoffice/content/save', {
|
||||
return fetch('/umbraco/backoffice/node/save', {
|
||||
method: 'POST',
|
||||
body: body,
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { handlers as contentHandlers } from './domains/content.handlers';
|
||||
import { handlers as contentHandlers } from './domains/node.handlers';
|
||||
import { handlers as dataTypeHandlers } from './domains/data-type.handlers';
|
||||
import { handlers as documentTypeHandlers } from './domains/document-type.handlers';
|
||||
import { handlers as installHandlers } from './domains/install.handlers';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { NodeEntity, umbNodeData } from '../data/node.data';
|
||||
|
||||
// TODO: add schema
|
||||
export const handlers = [
|
||||
rest.get('/umbraco/backoffice/content/:key', (req, res, ctx) => {
|
||||
rest.get('/umbraco/backoffice/node/:key', (req, res, ctx) => {
|
||||
console.warn('Please move to schema');
|
||||
const key = req.params.key as string;
|
||||
if (!key) return;
|
||||
@@ -14,7 +14,7 @@ export const handlers = [
|
||||
return res(ctx.status(200), ctx.json([document]));
|
||||
}),
|
||||
|
||||
rest.post<NodeEntity[]>('/umbraco/backoffice/content/save', (req, res, ctx) => {
|
||||
rest.post<NodeEntity[]>('/umbraco/backoffice/node/save', (req, res, ctx) => {
|
||||
console.warn('Please move to schema');
|
||||
const data = req.body;
|
||||
if (!data) return;
|
||||
@@ -1,4 +1,4 @@
|
||||
import { handlers as contentHandlers } from './domains/content.handlers';
|
||||
import { handlers as contentHandlers } from './domains/node.handlers';
|
||||
import { handlers as dataTypeHandlers } from './domains/data-type.handlers';
|
||||
import { handlers as documentTypeHandlers } from './domains/document-type.handlers';
|
||||
import { handlers as installHandlers } from './domains/install.handlers';
|
||||
|
||||
Reference in New Issue
Block a user