Passed
Push — task/application-touch-step-st... ( 8f1a36...136542 )
by Yonathan
07:42 queued 02:55
created

resources/assets/js/api/user.ts   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 10
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
c 0
b 0
f 0
dl 0
loc 10
rs 10
mnd 1
bc 1
fnc 0
bpm 0
cpm 0
noi 0
1
import { baseUrl } from "./base";
2
import { User } from "../models/types";
3
4
export const getAllUsersEndpoint = (ids = ""): string =>
5
  ids.length > 0 ? `${baseUrl()}/users/?id=${ids}` : `${baseUrl()}/users/`;
6
export const parseAllUsersResponse = (data: any): User[] => data;
7
8
export const getUserEndpoint = (id: number): string =>
9
  `${baseUrl()}/users/${id}`;
10