Add organization to file upload
So everyone in the org can see it.
This commit is contained in:
parent
e3535391dd
commit
f9c8f37cec
10 changed files with 812 additions and 127 deletions
|
|
@ -4,6 +4,8 @@ import (
|
|||
"context"
|
||||
"encoding/csv"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/models"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/userfile"
|
||||
|
|
@ -31,6 +33,9 @@ func ProcessJob(ctx context.Context, file_id int32) error {
|
|||
for {
|
||||
row, err := reader.Read()
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("Failed to read all CSV records for file %d: %w", file_id, err)
|
||||
}
|
||||
log.Debug().Strs("row", row).Msg("Line")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue