Pergunta de entrevista da empresa Topgolf

Take home: Prerequisites Java (JDK 8 or higher) sbt Getting started Unzip the archive: tar xzf tgm-scala-exercise.tar.gz Change to the project directory: cd tgm-scala-exercise Enter sbt run to download dependencies and start the web server. Open http://localhost:9000/ in your web browser to see the Admin UI. If this is the server's first request, you'll see a reddish-orange warning stating Database 'default' needs evolution!. Click the button labeled Apply this script now!. At this point, you should see a basic HTML admin page titled Login Prompts. You can test the client API by opening http://localhost:9000/api/loginPrompts. Tasks Please complete these tasks in order. The client application should be able to fetch a random login prompt when the user logs in. Please implement this in the /api/loginPrompts/random endpoint. Users are complaining about seeing the same login prompts too often. Modify the server to allow content creators to define a quiet period for each login prompt. After the server returns a login prompt for a user, that login prompt should not appear again until the quiet period has elapsed. Please implement this in the /api/loginPrompts/random/:userId endpoint. To get you started, we've initialized the database with some sample login prompts. Your code, however, should work with any collection of login prompts.