aboutsummaryrefslogtreecommitdiff
path: root/src/lib/models/__helpers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/models/__helpers.ts')
-rw-r--r--src/lib/models/__helpers.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/models/__helpers.ts b/src/lib/models/__helpers.ts
index f558ecb..b65c014 100644
--- a/src/lib/models/__helpers.ts
+++ b/src/lib/models/__helpers.ts
@@ -1,17 +1,17 @@
import { DataTypes, Model } from 'sequelize';
export const NEVER_USED = 'This should never be executed';
-function jsonParseGet(key: string, that: Model): any {
+export function jsonParseGet(key: string, that: Model): any {
return JSON.parse(that.getDataValue(key));
}
-function jsonParseSet(key: string, that: Model, value: any): any {
+export function jsonParseSet(key: string, that: Model, value: any): any {
return that.setDataValue(key, JSON.stringify(value));
}
export function jsonArrayInit(key: string): any {
return {
type: DataTypes.TEXT,
- get: function () {
+ get: function (): string[] {
return jsonParseGet(key, this);
},
set: function (val: string[]) {