Fixed initial errors
This commit is contained in:
@ -11,15 +11,17 @@ export const getInitialDataByAppleId = async (appleId: string) => {
|
||||
'x-api-key': process.env.EXPO_PUBLIC_API_KEY ?? '',
|
||||
},
|
||||
});
|
||||
console.log("InitialData API response: ", response);
|
||||
return response;
|
||||
} catch (error: unknown) {
|
||||
console.error('Error getting user by Apple ID:', error);
|
||||
console.error('Error getting Initial Data by Apple ID:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export const createUser =
|
||||
async (appleId: string, email: string, fullName: string, pushToken: string) => {
|
||||
export const createUser = async (
|
||||
appleId: string, email: string, fullName: string, pushToken: string
|
||||
) => {
|
||||
try {
|
||||
const apiUrl = `${process.env.EXPO_PUBLIC_API_URL}/api/users/createUser`;
|
||||
const response = await fetch(apiUrl, {
|
||||
@ -100,7 +102,8 @@ export const updateProfilePicture = async (userId: number, pfpUrl: string) => {
|
||||
|
||||
export const checkRelationshipStatus = async (userId: number) => {
|
||||
try {
|
||||
const apiUrl = `${process.env.EXPO_PUBLIC_API_URL}/api/users/checkRelationship`;
|
||||
const apiUrl =
|
||||
`${process.env.EXPO_PUBLIC_API_URL}/api/relationships/checkRelationship`;
|
||||
const response = await fetch((apiUrl + `?userId=${userId}`), {
|
||||
headers: {
|
||||
'x-api-key': process.env.EXPO_PUBLIC_API_KEY ?? '',
|
||||
@ -114,7 +117,7 @@ export const checkRelationshipStatus = async (userId: number) => {
|
||||
const relationshipData = await response.json() as RelationshipData;
|
||||
return relationshipData;
|
||||
} catch (error: unknown) {
|
||||
console.error('Error checking relationship status:', error);
|
||||
console.log('Error checking relationship status:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
@ -17,8 +17,8 @@ export const Colors = {
|
||||
tabIconSelected: tintColorLight,
|
||||
},
|
||||
dark: {
|
||||
text: dark,
|
||||
background: light,
|
||||
text: light,
|
||||
background: dark,
|
||||
tint: tintColorDark,
|
||||
icon: iconColorDark,
|
||||
tabIconDefault: iconColorDark,
|
||||
|
Reference in New Issue
Block a user