feat: implement template retrieval by ID and enhance error handling in template display for improved user experience
This commit is contained in:
@@ -32,6 +32,19 @@ export const obterTemplatePorCodigo = query({
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Obter template por ID
|
||||
*/
|
||||
export const obterTemplatePorId = query({
|
||||
args: {
|
||||
templateId: v.id("templatesMensagens"),
|
||||
},
|
||||
handler: async (ctx, args) => {
|
||||
const template = await ctx.db.get(args.templateId);
|
||||
return template;
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Criar template customizado (apenas TI_MASTER)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user