diff --git a/web-service/server/src/index.js b/web-service/server/src/index.js index c4062d542bae5a5aa802c84570c2da667606c2c2..0e4062f95f6ee1e9c79498d8e5f55b3b165b21c4 100644 --- a/web-service/server/src/index.js +++ b/web-service/server/src/index.js @@ -154,7 +154,7 @@ app.get('/stream/depth', (req, res) => { //app.get('/stream', (req, res)) /** - * Route for Google authentication API + * Route for Google authentication API page */ app.get('/google', passport.authenticate('google', { scope: ['profile'] @@ -162,7 +162,7 @@ app.get('/google', passport.authenticate('google', { /** * Google authentication API callback route. - * Sets the JWT to clients browser and redirects the user back to React app. + * Sets the JWT to clients browser and redirects the user back to front page (now has thumbnails). */ app.get('/auth/google/redirect', passport.authenticate('google'), (req, res) => { console.log(req.user) @@ -201,6 +201,10 @@ function broadcastExcept(exc, name, ...args) { } } +/** + * Need to think about how to use these. + * Will it be in the '/' route or in the '/streams/<stream>' route + */ app.ws('/', (ws, req) => { console.log("New web socket request"); diff --git a/web-service/server/src/seeds.js b/web-service/server/src/seeds.js new file mode 100644 index 0000000000000000000000000000000000000000..8cd4d670dbf46abbabab448e170d03bcf804e166 --- /dev/null +++ b/web-service/server/src/seeds.js @@ -0,0 +1,18 @@ + +/** + * This is a test db intended to have some random data + * to be used for testing thumbnail (and why not something else) + */ + + const testData = { + thumbnail: [ + { + name: 'source2', + frame: 'https://images.unsplash.com/photo-1564969982505-4c27fbfe7a1c?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80' + }, + { + name: 'source2', + frame: '' + }, + ] + } \ No newline at end of file