Skip to content

removeById

AGenson edited this page Mar 4, 2018 · 3 revisions

removeById

Remove the entity with the given id


Parameters

Property Type Default Description
ctx Object required Will serve to call a service action: ctx.call
id any required The field id of the entity to update

Return

Type: Promise

If the entity was removed successfully :

// res = id given in parameter
Promise.resolve({
	name: "Operation Successful",
	message: `Delete Complete: element (id: ${id}) deleted`,
	data: id
});

Else (entity not found / an error occured) :

Promise.reject({ ... });

cf - details about errors

Clone this wiki locally