forked from ecency/ecency-vision
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from spknetwork/signup-onboard
Signup onboard
- Loading branch information
Showing
24 changed files
with
1,211 additions
and
315 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import axios from "axios" | ||
|
||
// const baUrl = "http://localhost:4000" | ||
const baUrl = "https://breakaway-points-system-api.onrender.com" | ||
|
||
export const createBreakawayUser = async (username: string, community: string, referral: string, email: string)=> { | ||
try { | ||
const data = { | ||
username, | ||
community, | ||
referral, | ||
} | ||
const resp = await axios.post(`${baUrl}/signup-keychain`, data) | ||
return resp; | ||
} catch (err) { | ||
console.log(err) | ||
return err; | ||
} | ||
} | ||
|
||
export const createSolanaUser = async (email: string, password: string, solanaWalletAddress: string) => { | ||
try { | ||
const data = { | ||
email, | ||
password, | ||
solanaWalletAddress, | ||
}; | ||
|
||
const resp = await axios.post(`${baUrl}/offchain-users/register`, data); | ||
|
||
return resp.data; | ||
} catch (err) { | ||
console.log(err); | ||
|
||
return { err } | ||
} | ||
}; |
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
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
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
Oops, something went wrong.