"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const xrpc_server_1 = require("@atproto/xrpc-server");
const auth_scope_1 = require("../../../../auth-scope");
const proxy_1 = require("../../../proxy");
// THIS IS A TEMPORARY UNSPECCED ROUTE
function default_1(server, ctx) {
    server.com.atproto.temp.checkSignupQueue({
        auth: ctx.authVerifier.authorization({
            additional: [auth_scope_1.AuthScope.SignupQueued],
            authorize: () => {
                throw new xrpc_server_1.ForbiddenError('OAuth credentials are not supported for this endpoint');
            },
        }),
        handler: async ({ req }) => {
            if (!ctx.entrywayAgent) {
                return {
                    encoding: 'application/json',
                    body: {
                        activated: true,
                    },
                };
            }
            return (0, proxy_1.resultPassthru)(await ctx.entrywayAgent.com.atproto.temp.checkSignupQueue(undefined, ctx.entrywayPassthruHeaders(req)));
        },
    });
}
//# sourceMappingURL=checkSignupQueue.js.map