Skip to content

Commit

Permalink
[api] typos etc
Browse files Browse the repository at this point in the history
  • Loading branch information
MalinAhlberg committed Nov 29, 2024
1 parent 5c33b79 commit 1d21555
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/integration/tests/sda/60_api_admin_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
cd shared || true

token="$(curl http://oidc:8080/tokens | jq -r '.[0]')"
# Upload a file and mke sure it's listed
# Upload a file and make sure it's listed
result="$(curl -sk -L "http://api:8080/users/[email protected]/files" -H "Authorization: Bearer $token" | jq '. | length')"
if [ "$result" -ne 2 ]; then
echo "wrong number of files returned for user [email protected]"
Expand Down
1 change: 0 additions & 1 deletion sda/cmd/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ func deleteFile(c *gin.Context) {
submissionUser := c.Param("username")
log.Warn("submission user:", submissionUser)

// TODO: Add check for the input file path
fileID := c.Param("file")
fileID = strings.TrimPrefix(fileID, "/")
log.Warn("submission file:", fileID)
Expand Down
2 changes: 1 addition & 1 deletion sda/cmd/api/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Admin endpoints are only available to a set of whitelisted users specified in th
Example:

```bash
curl -H "Authorization: Bearer $token" -H "Content-Type: application/json" -X POST -d '{"accession_ids": ["my-id-01", "my-id-02"], "dataset_id": "my-dataset-01"}' https://HOSTNAME/dataset/create
curl -H "Authorization: Bearer $token" -H "Content-Type: application/json" -X DELETE https://HOSTNAME/file/[email protected]/123abc
```

- `/dataset/create`
Expand Down

0 comments on commit 1d21555

Please sign in to comment.