Remove people service and coredata
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -249,7 +249,7 @@ func NewMux(
|
||||
svc := proboSvc.WithTenant(data.Data.OrganizationID.TenantID())
|
||||
|
||||
// Get the people to get their email for watermark
|
||||
people, err := svc.Peoples.Get(r.Context(), data.Data.PeopleID)
|
||||
profile, err := iamSvc.OrganizationService.GetProfile(r.Context(), data.Data.PeopleID)
|
||||
if err != nil {
|
||||
http.Error(w, "cannot get user", http.StatusInternalServerError)
|
||||
return
|
||||
@@ -258,7 +258,7 @@ func NewMux(
|
||||
// Generate PDF with watermark
|
||||
pdfData, err := svc.Documents.ExportPDF(r.Context(), documentVersionID, probo.ExportPDFOptions{
|
||||
WithWatermark: true,
|
||||
WatermarkEmail: &people.PrimaryEmailAddress,
|
||||
WatermarkEmail: &profile.EmailAddress,
|
||||
WithSignatures: false,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -4094,7 +4094,7 @@ func (r *mutationResolver) SignDocument(ctx context.Context, input types.SignDoc
|
||||
identity := authn.IdentityFromContext(ctx)
|
||||
prb := r.ProboService(ctx, input.DocumentVersionID.TenantID())
|
||||
|
||||
documentVersionSignature, err := prb.Documents.SignDocumentVersionByEmail(ctx, input.DocumentVersionID, identity.EmailAddress)
|
||||
documentVersionSignature, err := prb.Documents.SignDocumentVersionByIdentity(ctx, input.DocumentVersionID, identity.ID)
|
||||
if err != nil {
|
||||
if errors.Is(err, coredata.ErrResourceAlreadyExists) {
|
||||
return nil, gqlutils.Conflict(ctx, err)
|
||||
|
||||
Reference in New Issue
Block a user