Created
July 23, 2020 00:09
-
-
Save simply-alliv/d7bf33645dfc3fadb835715d7c2d0e85 to your computer and use it in GitHub Desktop.
A function that returns a QR code, using the qrcode package.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ... Some lines omitted for brevity. | |
*/ | |
import * as QRCode from 'qrcode'; | |
class AuthenticationService { | |
... | |
public async respondWithQRCode(data: string, response: Response) { | |
QRCode.toFileStream(response, data); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment