Merge pull request #356 from davidmehren/fix-history-get

setHistory: Do not parse history into an array again
This commit is contained in:
Sheogorath 2020-05-10 17:15:19 +02:00 committed by GitHub
commit 5b05760c8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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