verify.ts 748 B

1234567891011121314151617181920
  1. import { Request as ExpressRequest, Response as ExpressResponse } from "express";
  2. import { existsSync, promises } from "fs";
  3. import { join } from "path";
  4. import { ENVIRONMENT } from "src/utils/environment";
  5. import { Option } from "@shared/common/async_utils";
  6. import { rpcClient } from "src/utils/rpc";
  7. export interface VerifyInfo {
  8. captchaSitekey: string;
  9. }
  10. type GetResult = Promise<ExpressResponse<VerifyInfo>>;
  11. export const get = async (req: ExpressRequest, res: ExpressResponse): GetResult => res.json({
  12. captchaSitekey: ENVIRONMENT.hCaptchaSitekey,
  13. });
  14. // type PostResult = Promise<ExpressResponse<Option<unknown, { error: string }>>>;
  15. // export const post = async (req: ExpressRequest, res: ExpressResponse): PostResult => {
  16. // };