Skip to content

Commit

Permalink
returned updated contact from updateContacts()
Browse files Browse the repository at this point in the history
  • Loading branch information
sahilmulla authored and machour committed Jun 16, 2024
1 parent f0b8d0a commit 01417aa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions _official-contacts-tutorial/app/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ export async function updateContact(id: string, updates: ContactMutation) {
if (!contact) {
throw new Error(`No contact found for ${id}`);
}
await fakeContacts.set(id, { ...contact, ...updates });
return contact;
return fakeContacts.set(id, { ...contact, ...updates });
}

export async function deleteContact(id: string) {
Expand Down

0 comments on commit 01417aa

Please sign in to comment.