mirror of
https://github.com/Jellify-Music/App.git
synced 2026-05-18 10:58:41 -05:00
14 lines
387 B
TypeScript
14 lines
387 B
TypeScript
import AsyncStorage from "@react-native-async-storage/async-storage"
|
|
import { AsyncStorageKeys } from "../../enums/async-storage-keys"
|
|
import _ from "lodash";
|
|
|
|
|
|
export const fetchServerUrl : () => Promise<string> = async () => {
|
|
|
|
let url = await AsyncStorage.getItem(AsyncStorageKeys.ServerUrl)!;
|
|
|
|
if (_.isNull(url))
|
|
throw Error("Server URL was null")
|
|
|
|
return url;
|
|
} |