docs(services): add comment for future improvement in category service
A comment has been added in the category service to return the new id in the future. Currently, the implementation returns a boolean value after creating a new category, but there is a plan to update this to return the generated id. Signed-off-by: Mathis <yidhra@tuta.io>
This commit is contained in:
parent
23116f4345
commit
a582f8c431
@ -24,6 +24,7 @@ async function createCategory(data: IDbCategory): Promise<boolean> {
|
|||||||
display_name: data.display_name,
|
display_name: data.display_name,
|
||||||
slug_name: data.slug_name
|
slug_name: data.slug_name
|
||||||
})
|
})
|
||||||
|
//TODO Return the new id
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(`Error creating category: ${error}`);
|
logger.error(`Error creating category: ${error}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user