Skip to content
Snippets Groups Projects
Commit 8f1b4cd9 authored by Sami Spets's avatar Sami Spets
Browse files

Added seeds.js

parent 0f24d356
No related branches found
No related tags found
No related merge requests found
Pipeline #14180 passed
...@@ -154,7 +154,7 @@ app.get('/stream/depth', (req, res) => { ...@@ -154,7 +154,7 @@ app.get('/stream/depth', (req, res) => {
//app.get('/stream', (req, res)) //app.get('/stream', (req, res))
/** /**
* Route for Google authentication API * Route for Google authentication API page
*/ */
app.get('/google', passport.authenticate('google', { app.get('/google', passport.authenticate('google', {
scope: ['profile'] scope: ['profile']
...@@ -162,7 +162,7 @@ app.get('/google', passport.authenticate('google', { ...@@ -162,7 +162,7 @@ app.get('/google', passport.authenticate('google', {
/** /**
* Google authentication API callback route. * 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) => { app.get('/auth/google/redirect', passport.authenticate('google'), (req, res) => {
console.log(req.user) console.log(req.user)
...@@ -201,6 +201,10 @@ function broadcastExcept(exc, name, ...args) { ...@@ -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) => { app.ws('/', (ws, req) => {
console.log("New web socket request"); console.log("New web socket request");
......
/**
* 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment