Files
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

19 lines
476 B
TypeScript

import type ApiKey from "@server/models/ApiKey";
import presentUser from "./user";
export default function presentApiKey(apiKey: ApiKey) {
return {
id: apiKey.id,
user: presentUser(apiKey.user),
userId: apiKey.userId,
name: apiKey.name,
scope: apiKey.scope,
value: apiKey.value,
last4: apiKey.last4,
createdAt: apiKey.createdAt,
updatedAt: apiKey.updatedAt,
expiresAt: apiKey.expiresAt,
lastActiveAt: apiKey.lastActiveAt,
};
}