Files
waha/src/core/QR.ts
T
2023-11-30 18:01:49 +07:00

14 lines
269 B
TypeScript

export class QR {
private base64: string;
public raw?: string;
save(base64: string, raw?: string) {
this.base64 = base64.replace(/^data:image\/png;base64,/, '');
this.raw = raw;
}
get(): Buffer {
return Buffer.from(this.base64, 'base64');
}
}