File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { 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 */
77export 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 */
1818export 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 ) ,
Original file line number Diff line number Diff line change 11import { 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 */
77export 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 */
1818export 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 ) ,
You can’t perform that action at this time.
0 commit comments