mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 03:42:23 -06:00
Fix: Resolve issue with template association in Instance model
The Issue: The Instance model in the postgresql-schema.prisma file previously had a Template field that was a single Template object, but this caused issues with the association of multiple templates to a single instance. The Change: This commit resolves the issue by changing the Template field to an array of Template objects. This allows for multiple templates to be associated with a single instance. The Impact: This change allows for more flexible use of templates in the system and resolves a previous limitation in the association of templates to instances. Affected Files: - prisma/postgresql-schema.prisma - src/api/services/template.service.ts Note: The migration folder added in the untracked files section is a result of the Prisma schema change and can be safely ignored in this commit message.
This commit is contained in:
@@ -64,6 +64,8 @@ export class TemplateService {
|
||||
throw new Error('Error to create template');
|
||||
}
|
||||
|
||||
console.log(response);
|
||||
|
||||
const template = await this.prismaRepository.template.create({
|
||||
data: {
|
||||
instanceId: getInstance.id,
|
||||
|
||||
Reference in New Issue
Block a user