From 1fe414325927c98f9add41884e2996ac69753555 Mon Sep 17 00:00:00 2001 From: Ivan Date: Tue, 19 Dec 2023 13:05:20 +0100 Subject: [PATCH] Fix merge conflicts (#25) Thank you! --- src/codegen/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/codegen/index.ts b/src/codegen/index.ts index cca1734..abdc1c4 100644 --- a/src/codegen/index.ts +++ b/src/codegen/index.ts @@ -162,21 +162,21 @@ ${tables // ===== ${t.name} ===== export interface ${t.typeName}Response extends ${baseRecord} { - collectionName: '${t.name}'; - ${t.columns.response.join('\n' + indent)} + collectionName: '${t.name}';${!t.columns.response.length ? '' : ` + ${t.columns.response.join('\n' + indent)}`} } ${ // view collections are readonly t.type === 'view' ? '' : ` -export interface ${t.typeName}Create extends ${t.type === "base" ? "BaseCollectionRecordCreate" : "AuthCollectionRecordCreate"} { +export interface ${t.typeName}Create extends ${t.type === "base" ? "BaseCollectionRecordCreate" : "AuthCollectionRecordCreate"} ${!t.columns.create.length ? '{}' : `{ ${t.columns.create.join('\n' + indent)} -} +}`} -export interface ${t.typeName}Update${t.type === "base" ? "" : " extends AuthCollectionRecordUpdate"} { +export interface ${t.typeName}Update${t.type === "base" ? "" : " extends AuthCollectionRecordUpdate"} ${!t.columns.update.length ? '{}' : `{ ${t.columns.update.join('\n' + indent)} -} +}`} ` } export interface ${t.typeName}Collection {