mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: fix a bunch of bugs.
This commit is contained in:
@@ -212,6 +212,11 @@ export default {
|
||||
if (!account) {
|
||||
return res.boom.notFound();
|
||||
}
|
||||
if (account.predefined) {
|
||||
return res.boom.badRequest(null, {
|
||||
errors: [{ type: 'ACCOUNT.PREDEFINED' , code: 200 }],
|
||||
});
|
||||
}
|
||||
const accountTransactions = await AccountTransaction.query()
|
||||
.where('account_id', account.id);
|
||||
|
||||
@@ -289,7 +294,6 @@ export default {
|
||||
const dynamicFilter = new DynamicFilter(Account.tableName);
|
||||
|
||||
if (filter.column_sort_by) {
|
||||
console.log(filter);
|
||||
if (resourceFieldsKeys.indexOf(filter.column_sort_by) === -1) {
|
||||
errorReasons.push({ type: 'COLUMN.SORT.ORDER.NOT.FOUND', code: 300 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user