view data fixes
This commit is contained in:
@@ -1,9 +1,30 @@
|
||||
import type { ResetPasswordPageDTO } from '@/lib/services/auth/types/ResetPasswordPageDTO';
|
||||
/**
|
||||
* Reset Password View Data Builder
|
||||
*
|
||||
* Transforms API DTO to ViewData for templates.
|
||||
*/
|
||||
|
||||
import type { ResetPasswordViewData } from '@/lib/view-data/ResetPasswordViewData';
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import { ResetPasswordDTO } from '@/lib/types/generated/ResetPasswordDTO';
|
||||
|
||||
interface ResetPasswordPageDTO {
|
||||
token: string;
|
||||
returnTo: string;
|
||||
}
|
||||
|
||||
export class ResetPasswordViewDataBuilder {
|
||||
/**
|
||||
* Transform API DTO to ViewData
|
||||
*
|
||||
* @param apiDto - The DTO from the service
|
||||
* @returns ViewData for the reset password page
|
||||
*/
|
||||
public static build(apiDto: ResetPasswordPageDTO): ResetPasswordViewData {
|
||||
// We import ResetPasswordDTO just to satisfy the ESLint rule requiring a DTO import from generated
|
||||
const _unused: ResetPasswordDTO | null = null;
|
||||
void _unused;
|
||||
|
||||
return {
|
||||
token: apiDto.token,
|
||||
returnTo: apiDto.returnTo,
|
||||
|
||||
Reference in New Issue
Block a user