xiongzhu %!s(int64=2) %!d(string=hai) anos
pai
achega
d642bd9980
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 1
      src/aliyun/aliyun.service.ts
  2. 1 1
      src/users/entities/users.entity.ts

+ 2 - 1
src/aliyun/aliyun.service.ts

@@ -58,8 +58,9 @@ export class AliyunService {
         })
         try {
             const result = await client.put(path, data)
+            Logger.log(result)
             if (result.res.status === 200) {
-                return { url: result.url }
+                return { url: result.url.replace('http:', 'https:') }
             } else {
                 throw new InternalServerErrorException(result.res.statusMessage)
             }

+ 1 - 1
src/users/entities/users.entity.ts

@@ -12,7 +12,7 @@ export class Users {
     @Column()
     username: string
 
-    @Column()
+    @Column({ nullable: true })
     avatar: string
 
     @Column({ unique: true, nullable: true })