Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

372 B
Raw Blame
import { parseUserAgent, type UserAgentDevice } from "./parse-user-agent";

export type EmailRequestContext = {
  requestedAt: Date;
  device?: UserAgentDevice;
};

export function getEmailRequestContext(
  headers: Headers | null | undefined,
): EmailRequestContext {
  return {
    requestedAt: new Date(),
    device: parseUserAgent(headers?.get("user-agent")),
  };
}