Skip to content

Commit 14731a4

Browse files
committed
fix: changed owner repo parts fetching from splitting url
1 parent d1a5aeb commit 14731a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fplus-http-server/src/router/allocator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ pub async fn create_from_json(file: web::Json<ChangedAllocator>) -> actix_web::R
4747
};
4848

4949
let owner_repo_parts: Vec<&str> = model.application.allocation_bookkeeping.split('/').collect();
50-
let owner = parts[3];
51-
let repo = parts[4];
50+
let owner = parts[owner_repo_parts.len() - 2];
51+
let repo = parts[owner_repo_parts.len() - 1];
5252

5353
let allocator_model = match allocators_db::create_or_update_allocator(
5454
owner.to_string(),

0 commit comments

Comments
 (0)