MCPcopy Create free account
hub / github.com/aptabase/aptabase / GetOwnedApp

Method GetOwnedApp

src/Features/Apps/AppsController.cs:486–500  ·  view source on GitHub ↗
(string appId)

Source from the content-addressed store, hash-verified

484 }
485
486 private async Task<Application?> GetOwnedApp(string appId)
487 {
488 var user = this.GetCurrentUserIdentity();
489 return await _db.Connection.QueryFirstOrDefaultAsync<Application>(
490 @"SELECT a.id, a.name, a.icon_path, a.app_key, true as has_ownership,
491 a.has_events, u.lock_reason
492 FROM apps a
493 INNER JOIN users u
494 ON u.id = a.owner_id
495 WHERE a.id = @appId
496 AND a.owner_id = @userId
497 AND a.deleted_at IS NULL",
498 new { appId, userId = user.Id }
499 );
500 }
501}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected