mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 15:44:45 -04:00
Refactor data processing to model definition
This commit is contained in:
parent
d9e19b6029
commit
b1ec3ba748
3 changed files with 27 additions and 0 deletions
|
@ -27,6 +27,12 @@ function stripNullByte(value) {
|
|||
}
|
||||
sequelize.stripNullByte = stripNullByte;
|
||||
|
||||
function processData(data, _default, process) {
|
||||
if (data === undefined) return data;
|
||||
else return data === null ? _default : (process ? process(data) : data);
|
||||
}
|
||||
sequelize.processData = processData;
|
||||
|
||||
var db = {};
|
||||
|
||||
fs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue