const { dashboard } = require("../controllers/dashboard");
const { forgotPassword, resetPassword, newPassword } = require("../controllers/forgotPassword");
const { login, notifications, userSignup, activateLink, logOut, activeTeam, checkActiveUser, 
  logoutAll, staffTime, resetPasswordFromProfile, getAdminData, updateAdminProfile, loginWithUserId, loginWithPin,
  getSidebarPermissions, updateSidebarOrder, getChatPostitionByUser, updateChatPostitionByUser,userSignupUpdate, 
  updateSimpleViewStatus, getSimpleViewStatus, updateClientViewType, getClientViewType, updateVendorViewType, getVendorViewType,
  getCommunityViewType,
  updateCommunityViewType,
  updateAdminViewType,
  getAdminViewType,
  updateProjectViewType,
  getProjectViewType,
  updateCommunityDesignViewType,
  getCommunityDesignViewType,
  updateCommunityInstallViewType,
  getCommunityInstallViewType,
  updateCommunityJobViewType,
  getCommunityJobViewType,
  updateCommunityOfficialRequestViewType,
  getCommunityOfficialRequestViewType,
  updateDesignOrderViewType,
  getDesignOrderViewType,
  updateDesignOrderJobViewType,
  getDesignOrderJobViewType,
  updateInstallationViewType,
  getInstallationViewType,
  updateOfficialRequestViewType,
  getOfficialRequestViewType,
  updatePickupViewType,
  getPickupViewType,
  updateProposalViewType,
  getProposalViewType,
  updateQuotationViewType,
  getQuotationViewType,
  updateShippingViewType,
  getShippingViewType,
  updateViewProjectType,
  getViewProjectType,
  updateProjectFilters,
  getProjectFilters,
  deleteProjectFilters,
  getUserPin,
  updateUserPin,
 } = require("../controllers/login");
const { isPrivileged } = require("../models/login");
const authRoutes = [
  {
    method: "POST",
    url: "/login",
    handler: login,
  },
  {
    method: "POST",
    url: "/logout",
    handler: logOut,
  },
  {
    method: "POST",
    url: "/forgot-password",
    handler: forgotPassword,
  },
  {
    method: "GET",
    url: "/reset-password/:email/:token",
    handler: resetPassword
  },
  {
    method: "POST",
    url: "/new-password",
    handler: newPassword,
  },
  {
    method: "POST",
    url: "/webservice/notification/fetch-all-notifications",
    handler: notifications,
  },
  {
    method: "POST",
    url: "/webservice/is-privileged",
    handler: isPrivileged
  },
  {
    method: "POST",
    url: "/webservice/user/signup",
    handler: userSignup
  },
  {
    method: "POST",
    url: "/webservice/user/activate-link",
    handler: activateLink
  },
  {
    method: "POST",
    url: "/webservice/user/dashboard",
    handler: dashboard
  },
  {
    method: "POST",
    url: "/webservice/user/live-team",
    handler:activeTeam
  },
  {
    method: "POST",
    url: "/webservice/user/logout-all",
    handler:logoutAll
  },
  {
    method: "POST",
    url: "/user/check-active-user",
    handler:checkActiveUser
  },
  {
    method: "POST",
    url: "/webservice/user/fetch-all-staff-time",
    handler:staffTime
  },
  {
    method: "POST",
    url: "/webservice/user/reset-password-from-profile",
    handler:resetPasswordFromProfile
  },
  {
    method: "POST",
    url: "/webservice/get-admin-data",
    handler:getAdminData
  },
  {
    method: "POST",
    url: "/webservice/update-admin-profile",
    handler:updateAdminProfile
  },
  {
    method:"POST",
    url:"/login-using-id",
    handler:loginWithUserId
  },
  {
    method:"POST",
    url:"/login-using-pin",
    handler:loginWithPin
  },
  {
    method:"POST",
    url:"/get-sidebar-permissions",
    handler:getSidebarPermissions
  },
  {
    method:"POST",
    url:"/update-sidebar-order",
    handler:updateSidebarOrder
  },
  {
    method:"POST",
    url:"/webservice/get-chat-position",
    handler:getChatPostitionByUser
  },
  {
    method:"POST",
    url:"/webservice/update-chat-position",
    handler:updateChatPostitionByUser
  },
  {
    method: "POST",
    url: "/webservice/user/signup-update-user",
    handler: userSignupUpdate
  },
  {
    method: "POST",
    url: "/webservice/update-simple-view-status",
    handler: updateSimpleViewStatus
  },
  {
    method: "POST",
    url: "/webservice/get-simple-view-status",
    handler: getSimpleViewStatus
  },
  {
    method: "POST",
    url: "/webservice/update-client-view-type",
    handler: updateClientViewType
  },
  {
    method: "POST",
    url: "/webservice/get-client-view-type",
    handler: getClientViewType
  },
  {
    method: "POST",
    url: "/webservice/update-vendor-view-type",
    handler: updateVendorViewType
  },
  {
    method: "POST",
    url: "/webservice/get-vendor-view-type",
    handler: getVendorViewType
  },
  {
    method: "POST",
    url: "/webservice/update-community-view-type",
    handler: updateCommunityViewType
  },
  {
    method: "POST",
    url: "/webservice/get-community-view-type",
    handler: getCommunityViewType
  },
  {
    method: "POST",
    url: "/webservice/update-admin-view-type",
    handler: updateAdminViewType
  },
  {
    method: "POST",
    url: "/webservice/get-admin-view-type",
    handler: getAdminViewType
  },
  {
    method: "POST",
    url: "/webservice/update-project-view-type",
    handler: updateProjectViewType
  },
  {
    method: "POST",
    url: "/webservice/get-project-view-type",
    handler: getProjectViewType
  },
  {
    method: "POST",
    url: "/webservice/update-community-design-view-type",
    handler: updateCommunityDesignViewType
  },
  {
    method: "POST",
    url: "/webservice/get-community-design-view-type",
    handler: getCommunityDesignViewType
  },
  {
    method: "POST",
    url: "/webservice/update-community-install-view-type",
    handler: updateCommunityInstallViewType
  },
  {
    method: "POST",
    url: "/webservice/get-community-install-view-type",
    handler: getCommunityInstallViewType
  },
  {
    method: "POST",
    url: "/webservice/update-community-job-view-type",
    handler: updateCommunityJobViewType
  },
  {
    method: "POST",
    url: "/webservice/get-community-job-view-type",
    handler: getCommunityJobViewType
  },
  {
    method: "POST",
    url: "/webservice/update-community-official-request-view-type",
    handler: updateCommunityOfficialRequestViewType
  },
  {
    method: "POST",
    url: "/webservice/get-community-official-request-view-type",
    handler: getCommunityOfficialRequestViewType
  },
  {
    method: "POST",
    url: "/webservice/update-design-order-view-type",
    handler: updateDesignOrderViewType
  },
  {
    method: "POST",
    url: "/webservice/get-design-order-view-type",
    handler: getDesignOrderViewType
  },
  {
    method: "POST",
    url: "/webservice/update-design-order-job-view-type",
    handler: updateDesignOrderJobViewType
  },
  {
    method: "POST",
    url: "/webservice/get-design-order-job-view-type",
    handler: getDesignOrderJobViewType
  },
  {
    method: "POST",
    url: "/webservice/update-installation-view-type",
    handler: updateInstallationViewType
  },
  {
    method: "POST",
    url: "/webservice/get-installation-view-type",
    handler: getInstallationViewType
  },
  {
    method: "POST",
    url: "/webservice/update-official-request-view-type",
    handler: updateOfficialRequestViewType
  },
  {
    method: "POST",
    url: "/webservice/get-official-request-view-type",
    handler: getOfficialRequestViewType
  },
  {
    method: "POST",
    url: "/webservice/update-pickup-view-type",
    handler: updatePickupViewType
  },
  {
    method: "POST",
    url: "/webservice/get-pickup-view-type",
    handler: getPickupViewType
  },
  {
    method: "POST",
    url: "/webservice/update-proposal-view-type",
    handler: updateProposalViewType
  },
  {
    method: "POST",
    url: "/webservice/get-proposal-view-type",
    handler: getProposalViewType
  },
  {
    method: "POST",
    url: "/webservice/update-quotation-view-type",
    handler: updateQuotationViewType
  },
  {
    method: "POST",
    url: "/webservice/get-quotation-view-type",
    handler: getQuotationViewType
  },
  {
    method: "POST",
    url: "/webservice/update-shipping-view-type",
    handler: updateShippingViewType
  },
  {
    method: "POST",
    url: "/webservice/get-shipping-view-type",
    handler: getShippingViewType
  },
  {
    method: "POST",
    url: "/webservice/update-view-project-type",
    handler: updateViewProjectType
  },
  {
    method: "POST",
    url: "/webservice/get-view-project-type",
    handler: getViewProjectType
  },
  {
    method: "POST",
    url: "/webservice/update-project-filters",
    handler: updateProjectFilters
  },
  {
    method: "POST",
    url: "/webservice/get-project-filters",
    handler: getProjectFilters
  },
  {
    method: "POST",
    url: "/webservice/delete-project-filters",
    handler: deleteProjectFilters
  },
  {
    method: "POST",
    url: "/webservice/get-user-pin",
    handler: getUserPin
  },
  {
    method: "POST",
    url: "/webservice/update-user-pin",
    handler: updateUserPin
  }
];

module.exports = authRoutes;
