Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3582 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3582 Rev 3719
Línea 1... Línea 1...
1
import { deleteData, sendData, getData, updateData, setBaseURL } from '../services/ApiClient';
1
import { deleteData, sendData, getData, updateData } from '../services/ApiClient';
2
 
2
 
3
class axios {
3
class axios {
4
  static delete = deleteData;
4
  static delete = deleteData;
5
  static post = sendData;
5
  static post = sendData;
6
  static get = getData;
6
  static get = getData;
7
  static put = updateData;
7
  static put = updateData;
8
  static create = setBaseURL;
-
 
9
}
8
}
10
 
9
 
11
export function getKeyByValue(object = {}, value) {
10
export function getKeyByValue(object = {}, value) {
12
  return Object.keys(object).find((key) => object[key] === value);
11
  return Object.keys(object).find((key) => object[key] === value);
13
}
12
}
14
 
13
 
15
export function generateUUID() {
14
export function generateUUID() {
16
  const uuid = crypto.randomUUID();
15
  const uuid = crypto.randomUUID();
17
  return uuid;
16
  return uuid;
18
}
17
}
19
 
18
 
20
export { axios };
19
export { axios };
21
export * from './globals';
20
export * from './globals';
22
export * from './devices';
21
export * from './devices';
23
export * from './notifications';
22
export * from './notifications';