"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.socialNetworkEmailsRouter = void 0;
const social_network_email_controller_1 = require("../../controllers/social-network/social-network-email.controller");
const auth_middleware_1 = require("../../middleware/auth.middleware");
const social_network_email_validator_1 = require("../../validators/social-network/social-network-email.validator");
const abstract_route_1 = require("../abstract.route");
const express = require("express");
const router = express.Router();
const controller = new social_network_email_controller_1.SocialNetworkEmailsController();
class SocialNetworkEmailsRoute extends abstract_route_1.AbstractRoute {
    constructor(_controller, _router) {
        super(_controller, _router, new social_network_email_validator_1.SocialNetworkEmailsValidator(), [
            "getItem",
            "getItems",
            "createItem",
            "sendEmail",
            "sendVerification",
            "verify",
        ]);
    }
    sendEmail() {
        this.router.post("/send", auth_middleware_1.AuthMiddleware, this.validator.sendEmail(), this.controller.sendEmail.bind(this.controller));
    }
    sendVerification() {
        this.router.post("/send-verification", auth_middleware_1.AuthMiddleware, this.validator.sendVerification(), this.controller.sendVerification.bind(this.controller));
    }
    verify() {
        this.router.post("/verify", auth_middleware_1.AuthMiddleware, this.validator.verify(), this.controller.verify.bind(this.controller));
    }
}
exports.socialNetworkEmailsRouter = new SocialNetworkEmailsRoute(controller, router).init();
