mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
23 lines
529 B
JavaScript
23 lines
529 B
JavaScript
import superagent from 'superagent'
|
|
import superagentPromise from 'superagent-promise'
|
|
// import auth from 'boost/auth'
|
|
|
|
export const SERVER_URL = 'https://b00st.io/'
|
|
// export const SERVER_URL = 'http://localhost:3333/'
|
|
|
|
export const request = superagentPromise(superagent, Promise)
|
|
|
|
export function shareViaPublicURL (input) {
|
|
return request
|
|
.post(SERVER_URL + 'apis/share')
|
|
// .set({
|
|
// Authorization: 'Bearer ' + auth.token()
|
|
// })
|
|
.send(input)
|
|
}
|
|
|
|
export default {
|
|
SERVER_URL,
|
|
shareViaPublicURL
|
|
}
|