Last active
January 13, 2021 15:42
-
-
Save polluterofminds/13a517970c7aeb53fffa8d5abf44aeb3 to your computer and use it in GitHub Desktop.
Auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
export const subscribe = async (email) => { | |
try { | |
const data = { | |
} | |
await axios.post("/api/subscribe", data); | |
return true; | |
} catch (error) { | |
console.log(error.response); | |
throw error; | |
} | |
} | |
export const login = async (email) => { | |
try { | |
const data = { | |
} | |
await axios.post("/api/login", data); | |
return true; | |
} catch (error) { | |
console.log(error.response); | |
throw error; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment