27 lines
524 B
TypeScript
27 lines
524 B
TypeScript
|
|
import { Injectable } from '@nestjs/common';
|
||
|
|
|
||
|
|
export interface WaitlistEntry {
|
||
|
|
id: string;
|
||
|
|
nickname: string;
|
||
|
|
email: string;
|
||
|
|
devices: string[];
|
||
|
|
interests: string[];
|
||
|
|
painpoint: string;
|
||
|
|
willingBeta: boolean;
|
||
|
|
createdAt: Date;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Injectable()
|
||
|
|
export class WaitlistRepository {
|
||
|
|
private entries: WaitlistEntry[] = [];
|
||
|
|
|
||
|
|
async findAll(): Promise<WaitlistEntry[]> {
|
||
|
|
return this.entries;
|
||
|
|
}
|
||
|
|
|
||
|
|
async create(entry: WaitlistEntry): Promise<WaitlistEntry> {
|
||
|
|
this.entries.push(entry);
|
||
|
|
return entry;
|
||
|
|
}
|
||
|
|
}
|