@@ -16,10 +16,10 @@ namespace StrDss.Service
16
16
{
17
17
public interface IUploadDeliveryService
18
18
{
19
- Task < Dictionary < string , List < string > > > UploadPlatformData ( string reportType , string reportPeriod , long orgId , Stream stream ) ;
19
+ Task < Dictionary < string , List < string > > > UploadData ( string reportType , string reportPeriod , long orgId , Stream stream ) ;
20
20
Task < ( Dictionary < string , List < string > > , string header ) > ValidateAndParseUploadAsync ( string reportPeriod , long orgId , string reportType , string hashValue , string [ ] mandatoryFields , TextReader textReader , List < DssUploadLine > uploadLines ) ;
21
21
Task < PagedDto < UploadHistoryViewDto > > GetUploadHistory ( long ? orgId , int pageSize , int pageNumber , string orderBy , string direction , string [ ] reportTypes ) ;
22
- Task < ( byte [ ] ? , bool hasAccess ) > GetRentalListingErrorFile ( long uploadId ) ;
22
+ Task < ( byte [ ] ? , bool hasAccess ) > GetErrorFile ( long uploadId ) ;
23
23
Task < DssUploadDelivery ? > GetNonTakedownUploadToProcessAsync ( ) ;
24
24
Task < DssUploadDelivery ? > GetUploadToProcessAsync ( string reportType ) ;
25
25
}
@@ -37,7 +37,7 @@ public UploadDeliveryService(
37
37
_orgRepo = orgRepo ;
38
38
}
39
39
40
- public async Task < Dictionary < string , List < string > > > UploadPlatformData ( string reportType , string reportPeriod , long orgId , Stream stream )
40
+ public async Task < Dictionary < string , List < string > > > UploadData ( string reportType , string reportPeriod , long orgId , Stream stream )
41
41
{
42
42
if ( _currentUser . OrganizationType != OrganizationTypes . BCGov && _currentUser . OrganizationId != orgId )
43
43
{
@@ -501,7 +501,7 @@ public async Task<PagedDto<UploadHistoryViewDto>> GetUploadHistory(long? orgId,
501
501
return await _uploadRepo . GetUploadHistory ( orgId , pageSize , pageNumber , orderBy , direction , reportTypes ) ;
502
502
}
503
503
504
- public async Task < ( byte [ ] ? , bool hasAccess ) > GetRentalListingErrorFile ( long uploadId )
504
+ public async Task < ( byte [ ] ? , bool hasAccess ) > GetErrorFile ( long uploadId )
505
505
{
506
506
var upload = await _uploadRepo . GetRentalListingUploadWithErrors ( uploadId ) ;
507
507
@@ -532,14 +532,14 @@ public async Task<PagedDto<UploadHistoryViewDto>> GetUploadHistory(long? orgId,
532
532
var contents = new StringBuilder ( ) ;
533
533
534
534
csv . Read ( ) ;
535
- var header = csv . Parser . RawRecord . TrimEndNewLine ( ) + ",errors" ;
535
+ var header = "errors," + csv . Parser . RawRecord . TrimEndNewLine ( ) ;
536
536
537
537
contents . AppendLine ( header ) ;
538
538
539
539
foreach ( var lineId in linesWithError )
540
540
{
541
541
var line = await _uploadRepo . GetUploadLineWithError ( lineId ) ;
542
- contents . AppendLine ( line . LineText . TrimEndNewLine ( ) + $ ", \" { line . ErrorText ?? "" } \" " ) ;
542
+ contents . AppendLine ( $ " \" { line . ErrorText ?? "" } \" ," + line . LineText . TrimEndNewLine ( ) ) ;
543
543
}
544
544
545
545
return ( Encoding . UTF8 . GetBytes ( contents . ToString ( ) ) , hasPermission ) ;
0 commit comments