fix: add missing mutex lock

pull/1/head
sundowndev 2024-02-27 17:52:27 +04:00
parent 0f1ad91770
commit 5cfc252fb0
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,9 @@ func (s *NotesService) ListNotes(_ *notesv1.ListNotesRequest, srv notesv1.NotesS
}
func (s *NotesService) AddNote(_ context.Context, req *notesv1.AddNoteRequest) (*notesv1.AddNoteResponse, error) {
s.mu.Lock()
defer s.mu.Unlock()
note := &notesv1.Note{
Id: uuid.Must(uuid.NewV4()).String(),
Title: req.Title,