CRUD correct on Ionic 4 with Auth?

Hi everyone,

I’m trying to adapt a CRUD app to only an Auth app empty, but the problem is i dont know how to deal with adding the info to the user, i have this code, but its not working, thank you so much

export interface Note {
  id?: string,
  name: string,
  notes: string
}

@Injectable({
  providedIn: 'root'
})
export class NoteService {

  private notes: Observable<Note[]>
  private noteCollection: AngularFirestoreCollection<Note>;

  constructor(private afs: AngularFirestore, private user: UserService, private afAuth: AngularFireAuth) {

    this.noteCollection = this.afs.collection<Note>(`/users/${user.getUID}/notes`);
    this.notes = this.noteCollection.snapshotChanges().pipe(
      map(actions => {
        return actions.map(a => {
          const data = a.payload.doc.data();
          const id = a.payload.doc.id;
          return { id, ...data }
        })
      })
    );

  }

  getNotes(): Observable<Note[]> {
    return this.noteCollection.valueChanges()
  }

  getNote(id: string): Observable<Note> {
    return this.noteCollection.doc<Note>(id).valueChanges().pipe(
      take(1),
      map(note => {
        note.id = id;
        return note
      })
    );
  }

  addNote(note: Note): Promise<DocumentReference> {
    return this.noteCollection.add(note);
  }

  updateNote(note: Note): Promise<void> {
    return this.afs.doc(`users/${this.afAuth.auth.currentUser.uid}/note/${note.id}`)
      .update(data => {
      name: note.name,
      notes: note.notes   
     });
  }

  deleteNote(id: string) {
    return this.noteCollection.doc(id).delete();
  }
}

Where can i learn how to do it correctly? (WITH AUTH)