Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Weblist Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fachschaftsrat MatheInfo
Karaoke
Weblist Frontend
Compare revisions
ed047a4fb0fc815f5c416f05a613846bd43c8258 to 8f67ce333dabcfaecdf393ca2a87c8e9cec2d7f1
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
fachschaftsrat-mathematikinformatik/karaoke/weblist-frontend
Select target project
No results found
8f67ce333dabcfaecdf393ca2a87c8e9cec2d7f1
Select Git revision
Swap
Target
fachschaftsrat-mathematikinformatik/karaoke/weblist-frontend
Select target project
fachschaftsrat-mathematikinformatik/karaoke/weblist-frontend
1 result
ed047a4fb0fc815f5c416f05a613846bd43c8258
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
On logout (egal wo) request default token
· 079593e4
Jan Moritz Mertens
authored
11 months ago
079593e4
Merge branch 'changes' into 'master'
· 8f67ce33
Jan Moritz Mertens
authored
11 months ago
On logout (egal wo) request default token See merge request
!7
8f67ce33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.vue
+1
-0
1 addition, 0 deletions
src/App.vue
src/components/ApiService.ts
+3
-0
3 additions, 0 deletions
src/components/ApiService.ts
with
4 additions
and
0 deletions
src/App.vue
View file @
8f67ce33
...
@@ -62,6 +62,7 @@ export default defineComponent({
...
@@ -62,6 +62,7 @@ export default defineComponent({
this
.
username
=
""
;
this
.
username
=
""
;
this
.
password
=
""
;
this
.
password
=
""
;
this
.
mainStore
.
$reset
();
this
.
mainStore
.
$reset
();
apiTokenGrant
(
import
.
meta
.
env
.
VITE_CLIENTID
,
null
,
null
)
},
},
getSongs
():
void
{
getSongs
():
void
{
apiGet
(
"
/song
"
).
then
((
response
:
AxiosResponse
<
Song
[]
>
)
=>
{
apiGet
(
"
/song
"
).
then
((
response
:
AxiosResponse
<
Song
[]
>
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/components/ApiService.ts
View file @
8f67ce33
...
@@ -12,6 +12,7 @@ export async function apiGet(path: string): Promise<AxiosResponse> {
...
@@ -12,6 +12,7 @@ export async function apiGet(path: string): Promise<AxiosResponse> {
}
catch
(
err
)
{
}
catch
(
err
)
{
if
(
err
instanceof
AxiosError
&&
err
.
response
?.
status
===
401
)
{
if
(
err
instanceof
AxiosError
&&
err
.
response
?.
status
===
401
)
{
mainStore
.
$reset
();
mainStore
.
$reset
();
await
apiTokenGrant
(
import
.
meta
.
env
.
VITE_CLIENTID
,
null
,
null
)
}
}
throw
err
;
throw
err
;
}
}
...
@@ -27,6 +28,7 @@ export async function apiPost(path: string, data: object): Promise<AxiosResponse
...
@@ -27,6 +28,7 @@ export async function apiPost(path: string, data: object): Promise<AxiosResponse
}
catch
(
err
)
{
}
catch
(
err
)
{
if
(
err
instanceof
AxiosError
&&
err
.
response
?.
status
===
401
)
{
if
(
err
instanceof
AxiosError
&&
err
.
response
?.
status
===
401
)
{
mainStore
.
$reset
();
mainStore
.
$reset
();
await
apiTokenGrant
(
import
.
meta
.
env
.
VITE_CLIENTID
,
null
,
null
)
}
}
throw
err
;
throw
err
;
}
}
...
@@ -69,6 +71,7 @@ export async function apiRefreshTokenGrant(refresh_token: string): Promise<void>
...
@@ -69,6 +71,7 @@ export async function apiRefreshTokenGrant(refresh_token: string): Promise<void>
}
catch
(
err
)
{
}
catch
(
err
)
{
if
(
err
instanceof
AxiosError
&&
err
.
response
?.
status
===
401
)
{
if
(
err
instanceof
AxiosError
&&
err
.
response
?.
status
===
401
)
{
mainStore
.
$reset
();
mainStore
.
$reset
();
await
apiTokenGrant
(
import
.
meta
.
env
.
VITE_CLIENTID
,
null
,
null
)
}
}
throw
err
;
throw
err
;
}
}
...
...
This diff is collapsed.
Click to expand it.