Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CodeGen
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
scripts
CodeGen
Commits
aa8922fd
Commit
aa8922fd
authored
3 years ago
by
Benedikt Heinrichs
Committed by
Petar Hristov
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update: Handle LocalStorage Coscine Values (coscine/issues#1833)
parent
8b4b3916
No related branches found
No related tags found
2 merge requests
!5
Release: Sprint/2022-03
,
!4
Update: Handle LocalStorage Coscine Values (coscine/issues#1833)
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/CodeGen/CodeGenerator/CoscineCodeGenerator.cs
+9
-2
9 additions, 2 deletions
src/CodeGen/CodeGenerator/CoscineCodeGenerator.cs
with
9 additions
and
2 deletions
src/CodeGen/CodeGenerator/CoscineCodeGenerator.cs
+
9
−
2
View file @
aa8922fd
using
Coscine.Configuration
;
using
Coscine.Configuration
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -64,7 +64,14 @@ namespace Coscine.CodeGen.CodeGenerator
combinationFileText
+=
@"
if (typeof coscine !== 'undefined' && typeof coscine.authorization !== 'undefined') {
accessToken = coscine.authorization.bearer;
accessToken = 'Bearer ' + coscine.authorization.bearer;
}
if (typeof window !== 'undefined') {
// LocalStorage > Global Variables
const localStorageToken = localStorage.getItem('coscine.authorization.bearer');
if (localStorageToken) {
accessToken = 'Bearer ' + localStorageToken;
}
}
const getHostName = () => {
...
...
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