Skip to content

Commit cbd7855

Browse files
committed
237/granular tag types - fixes (#276)
1 parent 5ce7fd6 commit cbd7855

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/lib/api/position-tags.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import { type TagDTO, type CreateTagInput } from '@/lib/schemas/tag.schema';
22

33
/**
4-
* GET /api/position-tags
4+
* GET /api/tags/position
55
* Fetches all position tags for the current org.
66
*/
77
export async function getOrgPositionTags(): Promise<TagDTO[]> {
8-
const res = await fetch('/api/position-tags');
8+
const res = await fetch('/api/tags/position');
99
const json = await res.json();
1010
if (!res.ok) throw new Error(json.message);
1111
return json.data;
1212
}
1313

1414
/**
15-
* POST /api/position-tags
15+
* POST /api/tags/position
1616
* Creates a new position tag in the current org.
1717
*/
1818
export async function createPositionTag(data: CreateTagInput): Promise<TagDTO> {
19-
const res = await fetch('/api/position-tags', {
19+
const res = await fetch('/api/tags/position', {
2020
method: 'POST',
2121
headers: { 'Content-Type': 'application/json' },
2222
body: JSON.stringify(data),

src/lib/api/task-template-tags.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import { type TagDTO, type CreateTagInput } from '@/lib/schemas/tag.schema';
22

33
/**
4-
* GET /api/task-template-tags
4+
* GET /api/tags/task-template
55
* Fetches all task template tags for the current org.
66
*/
77
export async function getOrgTaskTemplateTags(): Promise<TagDTO[]> {
8-
const res = await fetch('/api/task-template-tags');
8+
const res = await fetch('/api/tags/task-template');
99
const json = await res.json();
1010
if (!res.ok) throw new Error(json.message);
1111
return json.data;
1212
}
1313

1414
/**
15-
* POST /api/task-template-tags
15+
* POST /api/tags/task-template
1616
* Creates a new task template tag in the current org.
1717
*/
1818
export async function createTaskTemplateTag(data: CreateTagInput): Promise<TagDTO> {
19-
const res = await fetch('/api/task-template-tags', {
19+
const res = await fetch('/api/tags/task-template', {
2020
method: 'POST',
2121
headers: { 'Content-Type': 'application/json' },
2222
body: JSON.stringify(data),

0 commit comments

Comments
 (0)