This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
Sphere/app/api/token.js

13 lines
317 B
JavaScript
Raw Normal View History

2016-02-06 12:42:19 +00:00
import { AsyncStorage } from 'react-native';
2016-05-05 18:25:45 +01:00
import settings from '../settings/constants';
2016-02-06 12:42:19 +00:00
2016-02-14 19:19:11 +00:00
async function get() {
2016-05-05 18:25:45 +01:00
return await AsyncStorage.getItem(settings.get('STORAGE_KEY'));
2016-02-06 12:42:19 +00:00
}
2016-02-14 19:19:11 +00:00
async function set(token) {
2016-05-05 18:25:45 +01:00
return await AsyncStorage.setItem(settings.get('STORAGE_KEY'), token);
2016-02-06 12:42:19 +00:00
}
2016-02-14 19:19:11 +00:00
2016-05-05 18:25:45 +01:00
export default { get, set };