(string appId)
| 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 | } |
nothing calls this directly
no test coverage detected