Skip to content

Commit

Permalink
fix: oauth aff
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Nov 18, 2024
1 parent 7db7033 commit 334a242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/components/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { API, showError } from '../helpers';

export async function getOAuthState() {
let path = '/api/oauth/state';
let affCode = new URLSearchParams(window.location.search).get('aff');
if (affCode) {
let affCode = localStorage.getItem('aff');
if (affCode && affCode.length > 0) {
path += `?aff=${affCode}`;
}
const res = await API.get(path);
Expand Down

0 comments on commit 334a242

Please sign in to comment.