This can be useful for an IRC server to validate the accountId & nonce given and ensure the nickname matches. Reviewed-on: #1108 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>
8 lines
273 B
TypeScript
8 lines
273 B
TypeScript
import { RequestHandler } from "express";
|
|
import { getAccountForRequest } from "@/src/services/loginService";
|
|
|
|
export const getNameController: RequestHandler = async (req, res) => {
|
|
const account = await getAccountForRequest(req);
|
|
res.json(account.DisplayName);
|
|
};
|