Defining routes

Now that we have the required dependencies, we will update the routes. To work with Translation API, we are going to add two routes. One will return the list of supported languages and the other will translate text. Update server outescloud-ai-api.ts and add the supported-languages and translate-message routes as shown here:

// SNIPP SNIPP
router.get('/supported-languages', Authenticate, Authorize('user'), cloudAIAPI.getSupportedLanguages);
router.post('/translate-message', Authenticate, Authorize('user'), cloudAIAPI.translateMessage);
// SNIPP SNIPP
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.234.28