updated mobile media uploader logic to be more redundant
This commit is contained in:
@@ -137,6 +137,39 @@ export class MobileController {
|
||||
});
|
||||
}
|
||||
|
||||
findMediaAssetByExternalMediaId(
|
||||
fctx: FlowExecCtx,
|
||||
deviceId: number,
|
||||
externalMediaId: string,
|
||||
) {
|
||||
return traceResultAsync({
|
||||
name: "mobile.media.findByExternalId",
|
||||
fctx,
|
||||
attributes: {
|
||||
"app.mobile.device_id": deviceId,
|
||||
"app.mobile.external_media_id": externalMediaId,
|
||||
},
|
||||
fn: () =>
|
||||
this.mobileRepo.findMediaAssetByExternalMediaId(
|
||||
fctx,
|
||||
deviceId,
|
||||
externalMediaId,
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
findMediaAssetByHash(fctx: FlowExecCtx, deviceId: number, hash: string) {
|
||||
return traceResultAsync({
|
||||
name: "mobile.media.findByHash",
|
||||
fctx,
|
||||
attributes: {
|
||||
"app.mobile.device_id": deviceId,
|
||||
"app.mobile.media_hash": hash,
|
||||
},
|
||||
fn: () => this.mobileRepo.findMediaAssetByHash(fctx, deviceId, hash),
|
||||
});
|
||||
}
|
||||
|
||||
listDevices(
|
||||
fctx: FlowExecCtx,
|
||||
filters: ListMobileDevicesFilters,
|
||||
|
||||
Reference in New Issue
Block a user