diff --git a/src/content/4/fi/osa4b.md b/src/content/4/fi/osa4b.md index 1a534366e7..4cc9e5399e 100644 --- a/src/content/4/fi/osa4b.md +++ b/src/content/4/fi/osa4b.md @@ -873,6 +873,7 @@ notesRouter.post('/', async (request, response) => { response.status(201).json(savedNote) }) ``` +päivittämällä Express versioon 5 virheiden käsittely helpottuu ja koodia voi selkeyttää huomattavasti: try-catch-blokin voi jättää pois ja samoin next argumentin routereista. Lähde: https://dev.to/mahmud007/goodbye-asynchandler-native-async-support-in-express-5-2o9p ### Testin beforeEach-metodin optimointi