"use server"; import { api, unwrap } from "@/lib/api"; import { attempt, field, type ActionState } from "@/lib/actions"; /** Approves the sign-in code T5DE shows, signing that computer in as this person. */ export async function approveDevice(_: ActionState, form: FormData): Promise { return attempt(async () => { unwrap(await api.device.approve.post({ code: field(form, "code") })); }); }