import { check } from "express-validator";
import { validateResult } from "../../utils/handlers/validator.handle";
import { AbstractValidator } from "../abstract.validator";

export class SocialNetworkConnectsValidator extends AbstractValidator {
  constructor() {
    super();
  }
  createItem() {
    return [
      check("username").exists().isString(),
      check("provider_id").exists().isMongoId(),
      (req, res, next) => {
        validateResult(req, res, next);
      },
    ];
  }
  updateItem() {
    return [
      check("_id").exists().isMongoId(),
      check("username").exists().isString(),
      check("provider_id").exists().isMongoId(),
      (req, res, next) => {
        validateResult(req, res, next);
      },
    ];
  }
}
