Skip to content

Commit

Permalink
Merge branch 'subsetter_front_clean' into develop_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Nov 21, 2023
2 parents 8987695 + 2405494 commit 6cb09bf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
1 change: 1 addition & 0 deletions app/api/subsetter/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Settings(BaseSettings):
oauth2_client_secret: str
oauth2_redirect_url: str
vite_oauth2_redirect_url: str
allow_origins: str

minio_access_key: str
minio_secret_key: str
Expand Down
4 changes: 2 additions & 2 deletions app/api/subsetter/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"swagger_ui_client_id": cuahsi_oauth_client.client_id,
}

app = FastAPI(servers=[{"url": os.path.expandvars(os.environ['VITE_APP_API_URL'])}], swagger_ui_parameters=swagger_params)
app = FastAPI(servers=[{"url": get_settings().vite_oauth2_redirect_url}], swagger_ui_parameters=swagger_params)

origins = [os.path.expandvars(os.environ['ALLOW_ORIGINS'])]
origins = [get_settings().allow_origins]

app.add_middleware(
CORSMiddleware,
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/auth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ENDPOINTS, APP_URL } from '@/constants'
import { ENDPOINTS, APP_URL, OAUTH2_REDIRECT_URL } from '@/constants'
import { useAuthStore } from '@/stores/auth'
// import { fetchWrapper } from '@/_helpers/fetch-wrapper';
// function openLogInDialog(redirectTo) {
Expand All @@ -11,7 +11,7 @@ export async function logIn(callback) {

// alter redirect uri
const authUrl = new URL(json.authorization_url)
authUrl.searchParams.set('redirect_uri', `${APP_URL}/#/auth-redirect`)
authUrl.searchParams.set('redirect_uri', OAUTH2_REDIRECT_URL)
window.open(
authUrl.toString(),
'_blank',
Expand Down
7 changes: 0 additions & 7 deletions app/frontend/src/components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<v-footer app color="navbar" class="d-flex flex-column">
<div class="d-flex w-100 align-center">
<ThemeButton/>
<v-btn v-for="icon in icons" :key="icon" class="mx-4" :icon="icon" variant="plain" size="small"></v-btn>
<div class="text-center w-100">
{{ new Date().getFullYear() }} — <strong>Subsetter</strong>
</div>
Expand All @@ -16,12 +15,6 @@
<script setup>
import ThemeButton from './ThemeButton.vue';
import SubmitButton from './SubmitButton.vue';
const icons = [
'mdi-atom',
'mdi-mastodon',
'mdi-dna',
'mdi-biohazard',
]
</script>

<style lang="scss" scoped></style>
1 change: 1 addition & 0 deletions app/frontend/src/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const APP_NAME = import.meta.env.VITE_APP_NAME || "";
export const APP_URL = import.meta.env.VITE_APP_URL || "";
export const APP_BASE = import.meta.env.VITE_APP_BASE || "";
export const OAUTH2_REDIRECT_URL = import.meta.env.VITE_OAUTH2_REDIRECT_URL || "";

export const API_BASE = import.meta.env.VITE_APP_API_URL || "";
export const ENDPOINTS = {
Expand Down

0 comments on commit 6cb09bf

Please sign in to comment.