Skip to content

Commit

Permalink
docs(be): add delete-image api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaehyeon1020 committed Apr 6, 2024
1 parent fd79060 commit e5233fe
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/iris/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ go 1.21

require (
github.com/aws/aws-sdk-go-v2 v1.26.1
github.com/aws/aws-sdk-go-v2/config v1.27.10
github.com/aws/aws-sdk-go-v2/credentials v1.17.10
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1
github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0
github.com/rabbitmq/amqp091-go v1.9.0
github.com/redis/go-redis/v9 v9.5.1
Expand All @@ -23,8 +25,6 @@ require (

require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.10 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
Expand Down
41 changes: 41 additions & 0 deletions collection/admin/Problem/Delete Image/NOT_FOUND.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
meta {
name: NOT_FOUND
type: graphql
seq: 2
}

post {
url: {{gqlUrl}}
body: graphql
auth: none
}

body:graphql {
mutation DeleteImage ($filename: String!) {
deleteImage(filename: $filename) {
filename
createdById
createTime
}
}
}

body:graphql:vars {
{
"filename": "not found"
}
}

assert {
res.body.errors: isDefined
res.body.errors[0].extensions.code: eq NOT_FOUND
}

docs {
## Delete Image
S3 Bucket에 업로드된 이미지를 삭제합니다.

### Error Cases
#### NOT_FOUND
존재하는 filename을 사용해야 합니다.
}
31 changes: 31 additions & 0 deletions collection/admin/Problem/Delete Image/Succeed.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
meta {
name: Succeed
type: graphql
seq: 1
}

post {
url: {{gqlUrl}}
body: graphql
auth: none
}

body:graphql {
mutation DeleteImage ($filename: String!) {
deleteImage(filename: $filename) {
filename
createdById
createTime
}
}
}

body:graphql:vars {
{
"filename": "fill this field with filename after executing upload-image api"
}
}

assert {
res.body.data.deleteImage: isDefined
}

0 comments on commit e5233fe

Please sign in to comment.