aboutsummaryrefslogtreecommitdiff
path: root/src/lib/models/__helpers.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-02 19:26:10 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-02 19:26:10 -0400
commit1623beebadefa38769db134a0fbfce0c34b38846 (patch)
treef75b71cdda596acfe7bd09812f3cfa3a00a08e1a /src/lib/models/__helpers.ts
parent930b1a46830567fd51780f301e550dbf4a87c7f3 (diff)
downloadtanzanite-1623beebadefa38769db134a0fbfce0c34b38846.tar.gz
tanzanite-1623beebadefa38769db134a0fbfce0c34b38846.tar.bz2
tanzanite-1623beebadefa38769db134a0fbfce0c34b38846.zip
log command
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[]) {