Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nourbalaha committed Nov 6, 2024
1 parent 9cd67b9 commit 6163cdb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion server/e2e/publicapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,11 @@ func TestPublicAPI(t *testing.T) {
WithHeader("Authorization", token).
WithHeader("Content-Type", "application/json").
Expect().
Status(http.StatusNotFound)
Status(http.StatusBadRequest).
JSON().
IsEqual(map[string]any{
"error": "invalid project",
})
}

func publicAPISeeder(ctx context.Context, r *repo.Container) error {
Expand Down
4 changes: 2 additions & 2 deletions server/internal/infrastructure/mongo/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
)

var (
projectIndexes = []string{"workspace", "publication.token"}
projectUniqueIndexes = []string{"id"}
projectIndexes = []string{"workspace"}
projectUniqueIndexes = []string{"id", "publication.token"}
)

type ProjectRepo struct {
Expand Down

0 comments on commit 6163cdb

Please sign in to comment.