Skip to content

Commit 6bb4228

Browse files
committed
[DAPS-1515] Address comments
1 parent 8f291db commit 6bb4228

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

core/database/foxx/api/repo.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,14 @@ class Repo {
7474
//
7575
// Will return true if it does and false if it does not.
7676
if (a_key && a_key !== "repo/") {
77-
if (a_key.startsWith("repo/")) {
78-
this.#repo_id = a_key;
79-
this.#repo_key = a_key.slice("repo/".length);
80-
} else {
81-
this.#repo_id = "repo/" + a_key;
82-
this.#repo_key = a_key;
83-
}
84-
8577
// Use new repository operations to find the repo
86-
const findResult = RepositoryOps.find(this.#repo_id);
78+
const findResult = RepositoryOps.find(a_key);
8779

8880
if (findResult.ok) {
8981
this.#exists = true;
9082
this.#repository = findResult.value;
83+
this.#repo_id = findResult.value.data._id;
84+
this.#repo_key = findResult.value.data._key;
9185
} else {
9286
this.#exists = false;
9387
this.#error =

0 commit comments

Comments
 (0)