forked from
rocksky.app/rocksky
A decentralized music tracking and discovery platform built on AT Protocol 馃幍
1import axios from "axios";
2import { API_URL } from "../consts";
3
4const headers = {
5 authorization: `Bearer ${localStorage.getItem("token")}`,
6};
7export const joinBeta = async (email: string, platform: string) => {
8 switch (platform) {
9 case "spotify":
10 return await axios.post(
11 `${API_URL}/spotify/join`,
12 { email },
13 { headers },
14 );
15 case "google":
16 return await axios.post(
17 `${API_URL}/googledrive/join`,
18 { email },
19 { headers },
20 );
21 case "dropbox":
22 return await axios.post(
23 `${API_URL}/dropbox/join`,
24 { email },
25 { headers },
26 );
27 default:
28 return;
29 }
30};