mirror of
https://github.com/labring/laf.git
synced 2026-02-01 16:57:03 +00:00
fix(server): fix response check error in bucket-updating (#642)
This commit is contained in:
parent
f6e2c3572d
commit
c4d994e89f
@ -59,7 +59,6 @@ spec:
|
||||
value: {{ .Values.jwt.expires_in | quote}}
|
||||
- name: MINIO_DOMAIN
|
||||
value: {{ .Values.minio.domain }}
|
||||
- name: MINIO_INTERNAL_ENDPOINT
|
||||
- name: MINIO_EXTERNAL_ENDPOINT
|
||||
value: {{ .Values.minio.external_endpoint }}
|
||||
- name: MINIO_INTERNAL_ENDPOINT
|
||||
|
||||
@ -92,7 +92,7 @@ export class BucketController {
|
||||
@Get(':name')
|
||||
async findOne(@Param('appid') appid: string, @Param('name') name: string) {
|
||||
const data = await this.bucketService.findOne(appid, name)
|
||||
if (null === data) {
|
||||
if (!data) {
|
||||
throw new HttpException('bucket not found', HttpStatus.NOT_FOUND)
|
||||
}
|
||||
return ResponseUtil.ok(data)
|
||||
@ -120,7 +120,7 @@ export class BucketController {
|
||||
}
|
||||
|
||||
const res = await this.bucketService.update(bucket, dto)
|
||||
if (null === res) {
|
||||
if (!res) {
|
||||
return ResponseUtil.error('update bucket failed')
|
||||
}
|
||||
return ResponseUtil.ok(res)
|
||||
@ -143,7 +143,7 @@ export class BucketController {
|
||||
}
|
||||
|
||||
const res = await this.bucketService.delete(bucket)
|
||||
if (null === res) {
|
||||
if (!res) {
|
||||
return ResponseUtil.error('delete bucket failed')
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ export class BucketService {
|
||||
bucket.name,
|
||||
dto.policy,
|
||||
)
|
||||
if (out.$metadata.httpStatusCode !== 200) {
|
||||
if (out.$metadata.httpStatusCode !== 204) {
|
||||
this.logger.error('update bucket in minio failed: ', out)
|
||||
return false
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user