Skip to content

Instantly share code, notes, and snippets.

@coderkan
Created May 11, 2020 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderkan/2df2ab5c4dbb6a4e506f4db3a3cbe799 to your computer and use it in GitHub Desktop.
Save coderkan/2df2ab5c4dbb6a4e506f4db3a3cbe799 to your computer and use it in GitHub Desktop.
if (url.endsWith("/employes") && method === "POST") {
const { body } = req.clone();
// assign a new uuid to new employee
body.id = uuidv4();
return of(new HttpResponse({ status: 200, body })).pipe(delay(500));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment