2060 create a new api key (#2206)
* Add folder for api settings * Init create api key page * Update create api key page * Implement api call to create apiKey * Add create api key mutation * Get id when creating apiKey * Display created Api Key * Add delete api key button * Remove button from InputText * Update stuff * Add test for ApiDetail * Fix type * Use recoil instead of router state * Remane route paths * Remove online return * Move and test date util * Remove useless Component * Rename ApiKeys paths * Rename ApiKeys files * Add input text info testing * Rename hooks to webhooks * Remove console error * Add tests to reach minimum coverage
This commit is contained in:
18
front/src/testing/mock-data/api-keys.ts
Normal file
18
front/src/testing/mock-data/api-keys.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { ApiKey } from '~/generated/graphql';
|
||||
|
||||
type MockedApiKey = Pick<
|
||||
ApiKey,
|
||||
'id' | 'name' | 'createdAt' | 'updatedAt' | 'expiresAt' | '__typename'
|
||||
>;
|
||||
export const mockedApiKeyToken =
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0d2VudHktN2VkOWQyMTItMWMyNS00ZDAyLWJmMjUtNmFlY2NmN2VhNDE5IiwiaWF0IjoxNjk4MDkzMDU0LCJleHAiOjE2OTkzMTUxOTksImp0aSI6IjY0Njg3ZWNmLWFhYzktNDNmYi1hY2I4LTE1M2QzNzgwYmIzMSJ9.JkQ3u7aRiqOFQkgHcC-mgCU37096HRSo40A_9X8gEng';
|
||||
export const mockedApiKeys: Array<MockedApiKey> = [
|
||||
{
|
||||
id: 'f7c6d736-8fcd-4e9c-ab99-28f6a9031570',
|
||||
name: 'Zapier Integration',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
updatedAt: '2023-04-26T10:23:42.33625+00:00',
|
||||
expiresAt: '2100-11-06T23:59:59.825Z',
|
||||
__typename: 'ApiKey',
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user