Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/people/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const TEAMS = {
],
},
design: {
name: "Design & Social",
name: "Design & Marketing",
fields: [
{
key: "tools",
Expand Down
2 changes: 1 addition & 1 deletion src/people/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ export function createPeopleService(options: PeopleOptions) {
`invite:${invite.id}`,
p.contactEmail,
"PoliNetwork · collega il tuo account",
inviteText(p, `${dashboardUrl}/dashboard/account/me?peopleInvite=${token}`, invite.expiresAt)
inviteText(p, `${dashboardUrl}/people/invite?token=${token}`, invite.expiresAt)
)
log(u, p.id, v.sub, "Queued an account invite", now())
})
Expand Down
2 changes: 1 addition & 1 deletion tests/people-router.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("People tRPC contract", () => {
const h = harness()
await h.seed(false)
await h.service.sendInvite(master, { personId: "P-0003" })
const token = Object.values(h.state().mail)[0].text.match(/peopleInvite=([A-Za-z0-9_-]{43})/)?.[1] ?? ""
const token = Object.values(h.state().mail)[0].text.match(/invite\?token=([A-Za-z0-9_-]{43})/)?.[1] ?? ""
const actor: Actor = { kind: "user", sub: "newcomer", client: "admin-dashboard", telegramId: null }
const caller = makeRouter(h.service).createCaller(context([], actor))
await expect(caller.me.get()).rejects.toMatchObject({ code: "FORBIDDEN" })
Expand Down
4 changes: 2 additions & 2 deletions tests/people.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ describe("Pending assignments follow Auth's rules", () => {
const tokenOf = (h: ReturnType<typeof harness>) =>
Object.values(h.state().mail)
.at(-1)
?.text.match(/peopleInvite=([A-Za-z0-9_-]{43})/)?.[1] ?? ""
?.text.match(/invite\?token=([A-Za-z0-9_-]{43})/)?.[1] ?? ""

describe("Linking by invite", () => {
it("links whichever account accepts, acting as each assigner, without People permissions or a matching email", async () => {
Expand Down Expand Up @@ -787,7 +787,7 @@ describe("People mail outbox", () => {
id: mail.id,
to: "luca@example.org",
subject: mail.subject,
text: expect.stringContaining("https://admin.example.org/dashboard/account/me?peopleInvite="),
text: expect.stringContaining("https://admin.example.org/people/invite?token="),
})
expect(h.state().mail[mail.id]).toMatchObject({ status: "sent", error: null })
await h.service.deliverPending()
Expand Down
Loading