mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Cast digestConfig to any to serialize properly
This commit is contained in:
parent
89fb6255a5
commit
f217c6f4ad
1 changed files with 1 additions and 8 deletions
|
|
@ -17,19 +17,12 @@ export const setUserPersonalizationResolver = authorized<
|
|||
MutationSetUserPersonalizationArgs
|
||||
>(async (_, { input }, { authTrx, uid }) => {
|
||||
const newValues = input as Omit<SetUserPersonalizationInput, 'digestConfig'>
|
||||
const digestValues = input.digestConfig
|
||||
? {
|
||||
digestConfig: () => {
|
||||
return JSON.stringify(input.digestConfig)
|
||||
},
|
||||
}
|
||||
: {}
|
||||
const result = await authTrx(async (t) => {
|
||||
return t.getRepository(UserPersonalization).upsert(
|
||||
{
|
||||
user: { id: uid },
|
||||
digestConfig: input.digestConfig as any,
|
||||
...newValues,
|
||||
...digestValues,
|
||||
},
|
||||
['user']
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue