Insert data in to 4 endpoints via one request api in fileupload feature loopback4

84 Views Asked by At

I have uploaded the files using multer disk storage in loopback ,those details i want to create the entries in 4 different tables via one api request .Could you please tell me how we can achieve this ,Pls share if you any reference links ,Thank you

I dont how to do that , could you please tell me the way or share me any reference links

1

There are 1 best solutions below

0
On

You can achieve this by using multiple repositories in one request like this:

await this.firstRepository.create(data);
await this.secondRepository.create(data);
this.thirdRepository.create(data);