import axios from 'axios' ; import { mutate } from 'swr' ; import { HarperDBRecord } from '../types/interfaces' ; export default async function blockLogins ( isLoginBlocked , siteId , previousData ) { try { const response = axios . post ( '/api/site/block-logins' , { isLoginBlocked : isLoginBlocked , siteId : siteId , } ) ; console . log ( 'DATA MUTATED' ) ; return { success : true , response : response , } ; } catch ( e ) { return { success : false , error : e , } ; } }