Files
c552945643 141 provide apis for pin reset (#162)
* Simplified locals.user
Checked routes for accessibilty

* Fixed tests

* Fixed import errors

* Fixed invite test

* PIN API implementation

* Tests for pin reset

* HOusekeeping

* Update src/routes/api/tenants/[id]/clients/pin-reset/request/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixes for id and housekeeping

* DB migrations

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 18:17:42 +01:00

10 lines
369 B
SQL

CREATE TABLE "client_pin_reset_token" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"token" uuid DEFAULT gen_random_uuid() NOT NULL,
"email_hash" text NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"expires_at" timestamp NOT NULL,
"used" boolean DEFAULT false NOT NULL,
CONSTRAINT "client_pin_reset_token_token_unique" UNIQUE("token")
);