Skip to content

Commit eea088e

Browse files
Allow anon access and make package finding work OK
1 parent faf5cce commit eea088e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Telimena/Telimena.WebApp/Controllers/Api/V1/ToolkitController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ public ToolkitController(IToolkitDataUnitOfWork work, IFileSaver fileSaver, IFil
5858
/// <param name="id"></param>
5959
/// <returns></returns>
6060
[Audit]
61+
[AllowAnonymous]
6162
[HttpGet, Route("{id}", Name = Routes.Get)]
6263
public async Task<IHttpActionResult> Get(Guid id)
6364
{
64-
TelimenaToolkitData toolkitData = await this.work.ToolkitDataRepository.FirstOrDefaultAsync(x => x.PublicId == id).ConfigureAwait(false);
65+
TelimenaToolkitData toolkitData = await this.work.ToolkitDataRepository.FirstOrDefaultAsync(x
66+
=> x.TelimenaPackageInfo != null && x.TelimenaPackageInfo.PublicId == id).ConfigureAwait(false);
6567
if (toolkitData == null)
6668
{
6769
return this.BadRequest($"Toolkit id [{id}] does not exist");

0 commit comments

Comments
 (0)