apiKeysMock.ts 538 B

1234567891011121314151617181920212223242526
  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. secondsToLive: null,
  10. expiration: '2019-06-04',
  11. });
  12. }
  13. return keys;
  14. };
  15. export const getMockKey = (): ApiKey => {
  16. return {
  17. id: 1,
  18. name: 'test',
  19. role: OrgRole.Admin,
  20. secondsToLive: null,
  21. expiration: '2019-06-04',
  22. };
  23. };