Merge branch 'bugfix/save-entity' into feature/relation-types-2
This commit is contained in:
@@ -92,7 +92,7 @@ export const handlers = [
|
||||
},
|
||||
];
|
||||
|
||||
const value = umbDictionaryData.save([data])[0];
|
||||
const value = umbDictionaryData.save(data);
|
||||
|
||||
const createdResult = {
|
||||
value,
|
||||
@@ -110,7 +110,7 @@ export const handlers = [
|
||||
if (!key) return;
|
||||
|
||||
const dataToSave = JSON.parse(data[0].value);
|
||||
const saved = umbDictionaryData.save([dataToSave]);
|
||||
const saved = umbDictionaryData.save(dataToSave);
|
||||
|
||||
return res(ctx.status(200), ctx.json(saved));
|
||||
}),
|
||||
@@ -182,7 +182,7 @@ export const handlers = [
|
||||
if (!file) return;
|
||||
|
||||
importResponse.parentKey = req.url.searchParams.get('parentId') ?? null;
|
||||
umbDictionaryData.save([importResponse]);
|
||||
umbDictionaryData.save(importResponse);
|
||||
|
||||
// build the path to the new item => reflects the expected server response
|
||||
const path = ['-1'];
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { DocumentTypeResponseModel } from '@umbraco-cms/backend-api';
|
||||
|
||||
// TODO: add schema
|
||||
export const handlers = [
|
||||
rest.post<DocumentTypeResponseModel[]>('/umbraco/management/api/v1/document-type/:key', (req, res, ctx) => {
|
||||
rest.post<DocumentTypeResponseModel>('/umbraco/management/api/v1/document-type/:key', (req, res, ctx) => {
|
||||
const data = req.body;
|
||||
if (!data) return;
|
||||
|
||||
@@ -22,7 +22,7 @@ export const handlers = [
|
||||
return res(ctx.status(200), ctx.json([document]));
|
||||
}),
|
||||
|
||||
rest.post<DocumentTypeResponseModel[]>('/umbraco/management/api/v1/document-type/details/save', (req, res, ctx) => {
|
||||
rest.post<DocumentTypeResponseModel>('/umbraco/management/api/v1/document-type/details/save', (req, res, ctx) => {
|
||||
const data = req.body;
|
||||
if (!data) return;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ export const handlers = [
|
||||
mediaStartNodes: [],
|
||||
};
|
||||
|
||||
const invited = umbUsersData.save([newUser]);
|
||||
const invited = umbUsersData.save(newUser);
|
||||
|
||||
console.log('invited', invited);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user