|
|
@@ -73,10 +73,10 @@ export class ChatPdfService {
|
|
|
this.sequelize.sync()
|
|
|
}
|
|
|
|
|
|
- public async upload(file: Express.Multer.File, req) {
|
|
|
+ public async upload(file: Express.Multer.File, userId: number) {
|
|
|
const { originalname, buffer, mimetype } = file
|
|
|
let md5 = this.calculateMD5(buffer)
|
|
|
- const user = await this.apiUserService.findByUserId(req.user.userId)
|
|
|
+ const user = await this.apiUserService.findByUserId(userId)
|
|
|
if (!user) {
|
|
|
const res = await ChatEmbedding.findAll({
|
|
|
where: {
|