🐛 Drive related bug fixes

This commit is contained in:
2025-07-28 01:41:26 +08:00
parent f1b62d354f
commit 0d4473da69
2 changed files with 4 additions and 6 deletions

View File

@@ -52,6 +52,9 @@
</div>
<div v-if="bundleUploadMode" class="mt-3">
<div class="mb-3">
<file-pool-select v-model="filePool" @update:pool="currentFilePool = $event" />
</div>
<upload-area
:filePool="filePool"
:pools="pools as SnFilePool[]"

View File

@@ -22,15 +22,10 @@ public class BundleController(AppDatabase db) : ControllerBase
}
[HttpGet("{id:guid}")]
[Authorize]
public async Task<ActionResult<FileBundle>> GetBundle([FromRoute] Guid id, [FromQuery] string? passcode)
{
if (HttpContext.Items["CurrentUser"] is not Account currentUser) return Unauthorized();
var accountId = Guid.Parse(currentUser.Id);
var bundle = await db.Bundles
.Where(e => e.Id == id)
.Where(e => e.AccountId == accountId)
.Include(e => e.Files)
.FirstOrDefaultAsync();
if (bundle is null) return NotFound();
@@ -155,4 +150,4 @@ public class BundleController(AppDatabase db) : ControllerBase
return NoContent();
}
}
}