-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #23 Issue done (#30) Co-authored-by: Dinmukhamed Mailibay <[email protected]> * change the length to 120 * further formating --------- Co-authored-by: Vrushabh Patil <[email protected]>
- Loading branch information
1 parent
149e10d
commit 3e50602
Showing
294 changed files
with
5,164 additions
and
5,346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} | ||
"extends": ["next/core-web-vitals", "prettier"], | ||
"rules": { | ||
"indent": ["error", 2], | ||
"eol-last": ["error", "always"], | ||
"max-len": ["error", { "code": 120, "ignoreUrls": true, "ignoreStrings": true, "ignoreTemplateLiterals": true }], | ||
"semi": ["error", "always"], | ||
"no-trailing-spaces": ["error"], | ||
"arrow-body-style": ["warn", "as-needed"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"tabWidth": 2, | ||
"printWidth": 120, | ||
"trailingComma": "es5", | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { authOptions } from '@/lib/auth' | ||
import NextAuth from 'next-auth' | ||
import { authOptions } from '@/lib/auth'; | ||
import NextAuth from 'next-auth'; | ||
|
||
const handler = NextAuth(authOptions) | ||
export { handler as GET, handler as POST } | ||
const handler = NextAuth(authOptions); | ||
export { handler as GET, handler as POST }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { getServerSession } from 'next-auth' | ||
import { authOptions } from '@/lib/auth' | ||
import { getServerSession } from 'next-auth'; | ||
import { authOptions } from '@/lib/auth'; | ||
import { fetcher } from '@/lib/utils'; | ||
import { NextRequest } from 'next/server'; | ||
|
||
export async function GET(req: NextRequest, { params }: { params: { workspaceId: string } }): Promise<Response> { | ||
const workspaceId = params.workspaceId; | ||
const session = await getServerSession(authOptions) | ||
const user = session!.user | ||
const session = await getServerSession(authOptions); | ||
const user = session!.user; | ||
|
||
return await fetcher(`/limits/workspace/${workspaceId}`, { | ||
method: 'GET', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${user.apiKey}` | ||
}, | ||
}) | ||
}); | ||
} |
10 changes: 5 additions & 5 deletions
10
frontend/app/api/limits/workspace/[workspaceId]/storage/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import { getServerSession } from 'next-auth' | ||
import { authOptions } from '@/lib/auth' | ||
import { getServerSession } from 'next-auth'; | ||
import { authOptions } from '@/lib/auth'; | ||
import { fetcher } from '@/lib/utils'; | ||
import { NextRequest } from 'next/server'; | ||
|
||
export async function GET(req: NextRequest, { params }: { params: { workspaceId: string } }): Promise<Response> { | ||
const workspaceId = params.workspaceId; | ||
const session = await getServerSession(authOptions) | ||
const user = session!.user | ||
const session = await getServerSession(authOptions); | ||
const user = session!.user; | ||
|
||
return await fetcher(`/limits/workspace/${workspaceId}/storage`, { | ||
method: 'GET', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${user.apiKey}` | ||
}, | ||
}) | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
frontend/app/api/projects/[projectId]/datasets/[datasetId]/datapoints/all/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { getServerSession } from 'next-auth' | ||
import { authOptions } from '@/lib/auth' | ||
import { getServerSession } from 'next-auth'; | ||
import { authOptions } from '@/lib/auth'; | ||
import { fetcher } from '@/lib/utils'; | ||
|
||
export async function DELETE(req: Request, { params }: { params: { projectId: string, datasetId: string } }): Promise<Response> { | ||
const projectId = params.projectId; | ||
const datasetId = params.datasetId; | ||
const session = await getServerSession(authOptions) | ||
const user = session!.user | ||
const session = await getServerSession(authOptions); | ||
const user = session!.user; | ||
|
||
return await fetcher(`/projects/${projectId}/datasets/${datasetId}/datapoints/all`, { | ||
method: 'DELETE', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${user.apiKey}` | ||
}, | ||
}) | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
frontend/app/api/projects/[projectId]/datasets/[datasetId]/file-upload/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import { getServerSession } from 'next-auth' | ||
import { authOptions } from '@/lib/auth' | ||
import { type NextRequest } from 'next/server' | ||
import { fetcher } from '@/lib/utils' | ||
import { getServerSession } from 'next-auth'; | ||
import { authOptions } from '@/lib/auth'; | ||
import { type NextRequest } from 'next/server'; | ||
import { fetcher } from '@/lib/utils'; | ||
|
||
|
||
export async function POST(req: NextRequest, { params }: { params: { projectId: string, datasetId: string } }): Promise<Response> { | ||
const projectId = params.projectId | ||
const datasetId = params.datasetId | ||
const session = await getServerSession(authOptions) | ||
const user = session!.user | ||
const projectId = params.projectId; | ||
const datasetId = params.datasetId; | ||
const session = await getServerSession(authOptions); | ||
const user = session!.user; | ||
|
||
const data = await req.formData() | ||
const data = await req.formData(); | ||
|
||
const res = await fetcher(`/projects/${projectId}/datasets/${datasetId}/file-upload`, { | ||
method: 'POST', | ||
headers: { | ||
Authorization: `Bearer ${user.apiKey}` | ||
}, | ||
body: data | ||
}) | ||
}); | ||
|
||
return res | ||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.