Skip to content

Commit

Permalink
fix: pick required context properties for createRevision (#170)
Browse files Browse the repository at this point in the history
Co-authored-by: Dominique Wirz <dominique@smartive.ch>
  • Loading branch information
dwirz and Dominique Wirz committed May 22, 2024
1 parent 2c0a774 commit df262d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resolvers/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ const restore = async (model: EntityModel, { where }: { where: any }, ctx: FullC
return entity.id;
};

export const createRevision = async (model: EntityModel, data: Entity, ctx: Context) => {
export const createRevision = async (model: EntityModel, data: Entity, ctx: Pick<Context, 'knex' | 'now' | 'user'>) => {
if (model.updatable) {
const revisionId = uuid();
const rootRevisionData: Entity = {
Expand Down

0 comments on commit df262d0

Please sign in to comment.