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

Method ShareApp

src/Features/Apps/AppsController.cs:246–263  ·  view source on GitHub ↗
(string appId, string email)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected