1
0
Fork 0
mirror of synced 2024-09-29 16:51:33 +13:00

default user

This commit is contained in:
Martin McKeaveney 2021-04-15 23:14:10 +01:00
parent 4700b24793
commit 07d108aafa
2 changed files with 2 additions and 2 deletions

View file

@ -150,7 +150,7 @@ exports.save = async function(ctx) {
// this returns the table and row incase they have been updated
const dbTable = await db.get(inputs.tableId)
let { table, row } = inputProcessing(ctx.user || {}, dbTable, inputs)
let { table, row } = inputProcessing(ctx.user, dbTable, inputs)
const validateResult = await validate({
row,
table,

View file

@ -143,7 +143,7 @@ exports.coerce = (row, type) => {
* @param {object} table the table which the row is being saved to.
* @returns {object} the row which has been prepared to be written to the DB.
*/
exports.inputProcessing = (user, table, row) => {
exports.inputProcessing = (user = {}, table, row) => {
let clonedRow = cloneDeep(row)
// need to copy the table so it can be differenced on way out
const copiedTable = cloneDeep(table)