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
2016-05-07 19:32:59 +01:00

16 lines
421 B
JavaScript

import { AsyncStorage } from 'react-native';
import settings from '../settings/constants';
async function get() {
return await AsyncStorage.getItem(settings.get('STORAGE_KEY'));
}
async function set(token) {
return await AsyncStorage.setItem(settings.get('STORAGE_KEY'), token);
}
async function clear() {
return await AsyncStorage.removeItem(settings.get('STORAGE_KEY'));
}
export default { get, set, clear };