From 539d99b8352585131122424b0b6d4441cc5b4fcf Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 9 May 2020 14:34:56 +0200 Subject: [PATCH] setHistory: Do not parse history into an array again, historyPost already made sure we have an array Signed-off-by: David Mehren --- lib/history.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/history.ts b/lib/history.ts index 420d8c135..898b96a0f 100644 --- a/lib/history.ts +++ b/lib/history.ts @@ -81,9 +81,9 @@ function getHistory (userId, callback: (err: any, history: any) => void): void { }) } -function setHistory (userId: string, history: any, callback: (err: any | null, count: [number, User[]] | null) => void): void { +function setHistory (userId: string, history: any[], callback: (err: any | null, count: [number, User[]] | null) => void): void { User.update({ - history: JSON.stringify(parseHistoryMapToArray(history)) + history: JSON.stringify(history) }, { where: { id: userId