(string appId, string email)
| 244 | } |
| 245 | |
| 246 | [HttpPut("/api/_apps/{appId}/shares/{email}")] |
| 247 | public async Task<IActionResult> ShareApp(string appId, string email) |
| 248 | { |
| 249 | var app = await GetOwnedApp(appId); |
| 250 | if (app == null) |
| 251 | return NotFound(); |
| 252 | |
| 253 | await _db.Connection.ExecuteScalarAsync<string>(@" |
| 254 | INSERT INTO app_shares (app_id, email) |
| 255 | VALUES (@appId, @email) |
| 256 | ON CONFLICT DO NOTHING", new |
| 257 | { |
| 258 | appId, |
| 259 | email = email.ToLower(), |
| 260 | }); |
| 261 | |
| 262 | return Ok(new { }); |
| 263 | } |
| 264 | |
| 265 | [HttpDelete("/api/_apps/{appId}/shares/{email}")] |
| 266 | public async Task<IActionResult> UnshareApp(string appId, string email) |
nothing calls this directly
no outgoing calls
no test coverage detected