Skip to content

Category: Questions

Guard not returning authenticated user

I have created a guard And i am using it on of my endpoints The point is it is faling because getRequest is not returning the authenticated user it is returning undefined How can i return the authenticated user from the response ? Answer You should use your JwtAuthGuard at your controller level since nest doe…

Force Nuxt to run script tag

I have a script on a page: If I go to the page via a NuxtLink in the navigation the script runs, however if I type the URL to the browser address bar it doesn’t. Is there a way to force the NuxtLink result when the page is accessed directly? The script tag is coming from a CMS so there

Then Vs Await issue

You dont have to read the code, what is happening is a file is being uploaded 1000 bytes at a time. And to ensure that we send the bytes in order we are using await. What if I wanted to use .then(), it seems hard as there is a loop around the fetch call. Answer Here is the same functionality

How to delete a cookie in Reactjs

I am developing a web app with react front-end and node baack-end I want to delete the cookie being stored so that I can successfully be able to logout the user. I have tried using the js-cookie library and react-cookie library but it does not work. nav_component: How I set the cookie in the backend: It shoul…