]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/database-utils.ts
Replacing the err being thrown by a gracefull exit.process(1)
[github/Chocobozzz/PeerTube.git] / server / helpers / database-utils.ts
index 78ca768b91d491b870753f34da724afd41a91ae9..d09b4b245b60bb81ab3181933d8a52363e76335a 100644 (file)
@@ -35,7 +35,7 @@ function transactionRetryer <T> (func: (err: any, data: T) => any) {
   })
 }
 
-function updateInstanceWithAnother <T> (instanceToUpdate: Model<T>, baseInstance: Model<T>) {
+function updateInstanceWithAnother <T extends Model<T>> (instanceToUpdate: Model<T>, baseInstance: Model<T>) {
   const obj = baseInstance.toJSON()
 
   for (const key of Object.keys(obj)) {