setHistory: Do not parse history into an array again, historyPost already made sure we have an array

Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
David Mehren 2020-05-09 14:34:56 +02:00
parent d3aa040626
commit 539d99b835
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB

View file

@ -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