Skip to content

Commit

Permalink
remove admin endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
chase-manning committed Nov 30, 2023
1 parent 88eba7c commit a8fc56b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import admin from "firebase-admin";

import registrationHandler from "./registration";
import wrapHandler, { getUserAddress, validateParams } from "./utils";
import { generateAndSaveInviteCodes, userExists } from "./db";
import { userExists } from "./db";
import { APIError, SignedParams } from "./types";

admin.initializeApp();
Expand Down Expand Up @@ -45,11 +45,3 @@ export const inviteCodeUsed = onRequest(
return codeSnapshot.val().used;
})
);

export const adminCreateInviteCodes = onRequest(
wrapHandler(async (request) => {
const { amount } = validateParams<{ amount: string }>(request.query, "amount");
const adminAddress = "0x0000000000000000000000000000000000000000";
return await generateAndSaveInviteCodes(adminAddress, Number(amount));
})
);

0 comments on commit a8fc56b

Please sign in to comment.