-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathutils.ts
More file actions
34 lines (29 loc) · 746 Bytes
/
utils.ts
File metadata and controls
34 lines (29 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export function getFilteredPublicationsEndoint(
args: {
title: string;
tag: string[];
} = {
title: "",
tag: [],
}
) {
const { title, tag } = args;
return `/api/publications/filter/?title=${title}&tag=${tag}`;
}
export function getPaginatedFilteredPublicationsEndoint(
args: {
title: string;
tag: string[];
} = {
title: "",
tag: [],
}
) {
const { title, tag } = args;
return `/api/publications/p/filter/?title=${title}&tag=${tag ? tag : ""}`;
}
export function getPublicationEndpoint(slug: string) {
return getPublicationsEndpoint + slug + "/";
}
export const getPublicationsEndpoint = "/api/publications/";
export const getPaginatedPublicationsEndpoint = getPublicationsEndpoint + "p/";