-
-
Notifications
You must be signed in to change notification settings - Fork 25
API (wip) #1662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
API (wip) #1662
Conversation
| const data = userDoc.data() | ||
| return { | ||
| id: userDoc.id, | ||
| displayName: data?.displayName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: Expression expected
|
|
||
| const mockOrganization = ( | ||
| organization?: Partial<OrganizationDBEntity>, | ||
| users?: any[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| AggregateSpec: vi.fn() as unknown as any, | ||
| AggregateSpecData: vi.fn(), | ||
| AggregateType: vi.fn() as unknown as any, | ||
| BulkWriter: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| AggregateQuerySnapshot: vi.fn() as unknown as any, | ||
| AggregateSpec: vi.fn() as unknown as any, | ||
| AggregateSpecData: vi.fn(), | ||
| AggregateType: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| AggregateField: vi.fn() as unknown as any, | ||
| AggregateQuery: vi.fn() as unknown as any, | ||
| AggregateQuerySnapshot: vi.fn() as unknown as any, | ||
| AggregateSpec: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| getFirestore: firestoreStub(database), | ||
| initializeFirestore: vi.fn(), | ||
| AggregateField: vi.fn() as unknown as any, | ||
| AggregateQuery: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| return { | ||
| getFirestore: firestoreStub(database), | ||
| initializeFirestore: vi.fn(), | ||
| AggregateField: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| return firestoreConstructor | ||
| } | ||
|
|
||
| export const mockFirebaseAdminApp = (database: { [key: string]: any }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| bulkWriter: () => void | ||
| bundle: () => void | ||
| } { | ||
| return new FakeFirestore(database) as any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| import { vi } from 'vitest' | ||
| import { FakeFirestore } from 'firestore-vitest' | ||
|
|
||
| const firestoreStub = (database: { [key: string]: any }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
open-feedback
|
||||||||||||||||||||||||||||
| Project |
open-feedback
|
| Branch Review |
api
|
| Run status |
|
| Run duration | 02m 39s |
| Commit |
|
| Committer | Hugo Gresse |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
1
|
|
|
0
|
|
|
0
|
|
|
14
|
| View all changes introduced in this branch ↗︎ | |
| // Get API key from header | ||
| const apiKeyHeader = request.headers['x-api-key'] | ||
| const apiKeyParam = | ||
| typeof apiKeyHeader === 'string' ? apiKeyHeader : apiKeyHeader?.[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: Expression expected
| import { mockFirebaseAdminApp } from '../../testUtils/firestoreMock' | ||
|
|
||
| describe('/organizations/me', () => { | ||
| let fastify: any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| * This plugin adds Swagger documentation to the API | ||
| */ | ||
| export const openAPIPlugin = fastifyPlugin(async (fastify: FastifyInstance) => { | ||
| console.log('isNodeEnvDev', isNodeEnvDev, isNodeEnvTest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement no-console
Add a real API with either an organization API Key or an event API Key !
API Keys are available:
Endpoint added in this PR:
to test / todo :
Linked to #1454
this API will be made in multiple PR