Skip to content

Commit 0f2859f

Browse files
authored
fix: terms agreement now goes through updatePartner (#5998)
1 parent f15ae0c commit 0f2859f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sites/partners/__tests__/pages/users/terms.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ beforeEach(() => {
2626
rest.post("http://localhost:3100/auth/token", (_req, res, ctx) => {
2727
return res(ctx.json(""))
2828
}),
29-
rest.put("http://localhost/api/adapter/user/public", (_req, res, ctx) => {
29+
rest.put("http://localhost/api/adapter/user/partner", (_req, res, ctx) => {
3030
return res(ctx.json(""))
3131
})
3232
)

sites/partners/src/pages/users/terms.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ import { AuthContext } from "@bloom-housing/shared-helpers"
33
import { t } from "@bloom-housing/ui-components"
44
import FormsLayout from "../../layouts/forms"
55
import { FormTerms } from "../../components/users/FormTerms"
6+
import { PartnerUserUpdate } from "@bloom-housing/shared-helpers/src/types/backend-swagger"
67

78
const TermsPage = () => {
89
const { profile, userService, loadProfile } = useContext(AuthContext)
910

1011
const onSubmit = useCallback(async () => {
1112
if (!profile) return
1213

13-
await userService?.updatePublic({
14-
body: { ...profile, dob: profile.dob, agreedToTermsOfService: true },
14+
await userService?.updatePartner({
15+
body: { ...profile, dob: profile.dob, agreedToTermsOfService: true } as PartnerUserUpdate,
1516
})
1617

1718
loadProfile?.("/")

0 commit comments

Comments
 (0)