Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Maintenance on Tuesday 15.4. at 14:00. ETA 60 - 90 minutes.
Show more breadcrumbs
Nicolas Pope
ftl
Commits
8f1b4cd9
Commit
8f1b4cd9
authored
5 years ago
by
Sami Spets
Browse files
Options
Downloads
Patches
Plain Diff
Added seeds.js
parent
0f24d356
No related branches found
No related tags found
No related merge requests found
Pipeline
#14180
passed
5 years ago
Stage: all
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web-service/server/src/index.js
+6
-2
6 additions, 2 deletions
web-service/server/src/index.js
web-service/server/src/seeds.js
+18
-0
18 additions, 0 deletions
web-service/server/src/seeds.js
with
24 additions
and
2 deletions
web-service/server/src/index.js
+
6
−
2
View file @
8f1b4cd9
...
@@ -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 diff is collapsed.
Click to expand it.
web-service/server/src/seeds.js
0 → 100644
+
18
−
0
View file @
8f1b4cd9
/**
* 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment