Skip to content

Commit

Permalink
Removed /lab/ routing for callback link compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
TOOPRICEYY committed Jul 31, 2023
1 parent d9aae65 commit 9d7849d
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 427 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ export const sidebarLinks = [
{
icon: LayoutDashboard,
title: "Lab",
href: "/lab/playground",
href: "/playground",
},
{
icon: Plug,
title: "Integrations",
href: "/lab/integrations",
href: "/integrations",
},
{
icon: HardDrive,
title: "Datasets",
href: "/lab/datasets",
href: "/datasets",
},
{
icon: SignalHigh,
Expand Down
4 changes: 1 addition & 3 deletions neurofusion/next-client/src/lib/azure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import JSZip from 'jszip';
import { saveAs } from 'file-saver';
import { getSession } from 'next-auth/react'

export const getDatasets = async (startDate:any, endDate:any) => {
export const getDatasets = async (startDate:string, endDate:string) => {
const session = await getSession()
if(!session?.user) return []
const res = await axios.get(
Expand All @@ -21,8 +21,6 @@ export const getDatasets = async (startDate:any, endDate:any) => {
);

if (res.status == 200) {
console.log("avaliable datasets");
console.log(res.data);
return res.data.blobNames;
} else {
console.error(`unable to fetch datasets`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const authOptions: NextAuthOptions = {
},
callbacks: {
async redirect() {
return "/lab/playground";
return "/playground";
},
async jwt({ token, user }) {
if (user) {
Expand Down
2 changes: 1 addition & 1 deletion neurofusion/next-client/src/pages/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
if (session) {
return {
redirect: {
destination: "/lab/integrations",
destination: "/integrations",
permanent: false,
},
};
Expand Down
294 changes: 0 additions & 294 deletions neurofusion/next-client/src/pages/lab/datasets.tsx

This file was deleted.

34 changes: 0 additions & 34 deletions neurofusion/next-client/src/pages/lab/integrations.tsx

This file was deleted.

Loading

0 comments on commit 9d7849d

Please sign in to comment.