apiKeysMock.ts 424 B

12345678910111213141516171819202122
  1. import { ApiKey, OrgRole } from 'app/types';
  2. export const getMultipleMockKeys = (numberOfKeys: number): ApiKey[] => {
  3. const keys: ApiKey[] = [];
  4. for (let i = 1; i <= numberOfKeys; i++) {
  5. keys.push({
  6. id: i,
  7. name: `test-${i}`,
  8. role: OrgRole.Viewer,
  9. });
  10. }
  11. return keys;
  12. };
  13. export const getMockKey = (): ApiKey => {
  14. return {
  15. id: 1,
  16. name: 'test',
  17. role: OrgRole.Admin,
  18. };
  19. };