a guest Sep 20th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Which database tables are created in the migrations?
- >> user, language, word
- What are the endpoints for user registration, login and refresh?
- >> /api/user and api/auth
- What endpoints have been implemented in the language router?
- >> /api/language
- What is the async and await syntax for?
- >> asynchronous calls to the database for information
- Which endpoints need implementing in the language router?
- >> .get and .post
- How does the GET /api/language endpoint decide which language to respond with?
- >> uses getUsersLanguage service to check database
- In the UserService.populateUserWords method, what is db.transaction?
- >> Transactions are a fundamental concept of all database systems. The essential point of a transaction is that it bundles multiple steps into a single, all-or-nothing operation. The intermediate states between the steps are not visible to other concurrent transactions, and if some failure occurs that prevents the transaction from completing, then none of the steps affect the database at all.
- What is SERIAL in the create migration files?
- >> Creates a sequence
- What is setval in the seed file?
- >> Set sequence's current value
- Which routes are already set up and what are their paths?
- >> DashboardRoute('/'), LearningRoute ('/learn'), RegistrationRoute ('/register'), LoginRoute ('/login'), NotFoundRoute('/any')
- What is the concern of the AuthApiService object?
- >> Creating users, creating tokens, and refreshing tokens
- What is the concern of the UserContext?
- >> refreshing tokens, idle logout, logout
- Does the PrivateRoute make use of the UserContext?
- >> Yes, uses user ID and user idle
- What does the /cypress/integration/day-0.1-purpose.spec.js file test?
- >> (1) Visit to '/', (2) Get h1, (3) h1 contains "Spaced Repetition", (4) GET p, (5) p contains "Practice learning a language with the spaced reptition revision technique" (spelled incorrectly, repetition not reptition)
- Which elements on the page are being checked in and what for?
- >> h1, p
RAW Paste Data