Update type signature
This commit is contained in:
@ -2978,7 +2978,7 @@ export type UpdateSubscriptionInput = {
|
||||
description?: InputMaybe<Scalars['String']>;
|
||||
id: Scalars['ID'];
|
||||
lastFetchedAt?: InputMaybe<Scalars['Date']>;
|
||||
lastfetchedChecksum?: InputMaybe<Scalars['String']>;
|
||||
lastFetchedChecksum?: InputMaybe<Scalars['String']>;
|
||||
name?: InputMaybe<Scalars['String']>;
|
||||
status?: InputMaybe<SubscriptionStatus>;
|
||||
};
|
||||
|
||||
@ -2391,7 +2391,7 @@ input UpdateSubscriptionInput {
|
||||
description: String
|
||||
id: ID!
|
||||
lastFetchedAt: Date
|
||||
lastfetchedChecksum: String
|
||||
lastFetchedChecksum: String
|
||||
name: String
|
||||
status: SubscriptionStatus
|
||||
}
|
||||
|
||||
@ -282,19 +282,17 @@ export const updateSubscriptionResolver = authorized<
|
||||
const updatedSubscription = await authTrx(async (t) => {
|
||||
const repo = t.getRepository(Subscription)
|
||||
|
||||
const dict = {
|
||||
// update subscription
|
||||
await t.getRepository(Subscription).save({
|
||||
id: input.id,
|
||||
name: input.name || undefined,
|
||||
description: input.description || undefined,
|
||||
lastFetchedAt: input.lastFetchedAt
|
||||
? new Date(input.lastFetchedAt)
|
||||
: undefined,
|
||||
lastFetchedChecksum: input.lastfetchedChecksum || undefined,
|
||||
lastFetchedChecksum: input.lastFetchedChecksum || undefined,
|
||||
status: input.status || undefined,
|
||||
}
|
||||
console.log('saving dict:', JSON.stringify(dict))
|
||||
// update subscription
|
||||
await t.getRepository(Subscription).save(dict)
|
||||
})
|
||||
|
||||
return repo.findOneByOrFail({
|
||||
id: input.id,
|
||||
|
||||
Reference in New Issue
Block a user