While working with this code snippet, I encountered the following error message: 'Argument of type 'boolean' is not assignable to parameter of type '(value: string, index: number) => ObservableInput'
onFileSelected(event: any, user: any){
this.crudservice.upload(event.target.files[0], `images/profile/${user.uid}`).pipe(
concatMap(res => this.crudservice.updateProfileData({res}))
).subscribe()
}
The specific line causing the issue is:
res => this.crudservice.updateProfileData({res})
I've included the method being called for reference:
updateProfileData(profileData: any){
const user = firebase.auth().currentUser
return of(user).pipe(
concatMap(user =>{
if(!user) throw new Error('Not Authenticated');
return updateProfile(user,profileData)
})
)
}