Skip to content

Commit

Permalink
check sign endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
SalmanAsh committed Aug 27, 2024
1 parent 3963af9 commit 5f34647
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/api/agreementSignature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
tagData,
} from "codeforlife/utils/api"

import { type Contributor } from "./contributor"
import api from "."

export type AgreementSignature = Model<
Expand Down Expand Up @@ -52,7 +51,7 @@ export type CreateAgreementSignatureArg = CreateArg<
export type CheckSignedAgreementSignatureResult =
| { latest_commit_id: string; status: 404 | 451 }
| { status: 200 }
export type CheckSignedAgreementSignatureArg = Pick<Contributor, "id">
export type CheckSignedAgreementSignatureArg = { contributor_id: number }

const agreementSignatureApi = api.injectEndpoints({
endpoints: build => ({
Expand Down Expand Up @@ -91,10 +90,11 @@ const agreementSignatureApi = api.injectEndpoints({
CheckSignedAgreementSignatureResult,
CheckSignedAgreementSignatureArg
>({
query: ({ id, ...body }) => ({
url: buildUrl(agreementSignatureUrls.detail, { url: { id } }),
method: "PUT",
body,
query: ({ contributor_id }) => ({
url: buildUrl(agreementSignatureUrls.detail + "check-signed/", {
url: { contributor_id },
}),
method: "GET",
}),
}),
}),
Expand Down

0 comments on commit 5f34647

Please sign in to comment.