44 * Created Date: 2025-12-06 17:28:44
55 * Author: 3urobeat
66 *
7- * Last Modified: 2026-05-04 22:52:40
7+ * Last Modified: 2026-05-06 19:56:15
88 * Modified By: 3urobeat
99 *
1010 * Copyright (c) 2025 - 2026 3urobeat <https://github.com/3urobeat>
@@ -80,14 +80,13 @@ export async function upsertLabels(labels: Label[]): Promise<void> {
8080
8181}
8282
83-
8483/**
8584 * Removes label
8685 * @throws Throws Exception on failure
8786 * @param labelID Label ID to remove
8887 * @returns
8988 */
90- async function removeLabel ( labelID : string ) : Promise < void > {
89+ async function deleteLabel ( labelID : string ) : Promise < void > {
9190
9291 await labelsDb . removeAsync ( { id : labelID } , { } ) ;
9392
@@ -105,10 +104,10 @@ async function removeLabel(labelID: string): Promise<void> {
105104 * @param labelIDs Labels to remove
106105 * @returns
107106 */
108- export async function removeLabels ( labelIDs : string [ ] ) : Promise < void > {
107+ export async function deleteLabels ( labelIDs : string [ ] ) : Promise < void > {
109108
110- // Call removeLabel for every label and await all resulting promises
111- await Promise . all ( labelIDs . map ( ( e ) => removeLabel ( e ) ) ) ;
109+ // Call deleteLabel for every label and await all resulting promises
110+ await Promise . all ( labelIDs . map ( ( e ) => deleteLabel ( e ) ) ) ;
112111
113112}
114113
@@ -172,7 +171,7 @@ export async function upsertLabelCategories(categories: Category[]): Promise<voi
172171 * @param categoryID Category ID to remove
173172 * @returns
174173 */
175- async function removeLabelCategory ( categoryID : string ) : Promise < void > {
174+ async function deleteLabelCategory ( categoryID : string ) : Promise < void > {
176175
177176 await labelCategoriesDb . removeAsync ( { id : categoryID } , { } ) ;
178177
@@ -192,10 +191,10 @@ async function removeLabelCategory(categoryID: string): Promise<void> {
192191 * @param categoryIDs Labels to remove
193192 * @returns
194193 */
195- export async function removeLabelCategories ( categoryIDs : string [ ] ) : Promise < void > {
194+ export async function deleteLabelCategories ( categoryIDs : string [ ] ) : Promise < void > {
196195
197- // Call removeLabelCategory for every category and await all resulting promises
198- await Promise . all ( categoryIDs . map ( ( e ) => removeLabelCategory ( e ) ) ) ;
196+ // Call deleteLabelCategory for every category and await all resulting promises
197+ await Promise . all ( categoryIDs . map ( ( e ) => deleteLabelCategory ( e ) ) ) ;
199198
200199}
201200
0 commit comments