mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-18 05:30:48 -04:00
Merge branch 'master' into updating-service_sms_senders
This commit is contained in:
@@ -16,7 +16,7 @@ class Encryption:
|
||||
|
||||
|
||||
def hashpw(password):
|
||||
return generate_password_hash(password.encode('UTF-8'), 10)
|
||||
return generate_password_hash(password.encode('UTF-8'), 10).decode('utf-8')
|
||||
|
||||
|
||||
def check_hash(password, hashed_password):
|
||||
|
||||
@@ -1337,7 +1337,7 @@ class ServiceEmailReplyTo(db.Model):
|
||||
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
|
||||
service_id = db.Column(UUID(as_uuid=True), db.ForeignKey('services.id'), unique=False, index=True, nullable=False)
|
||||
service = db.relationship(Service, backref=db.backref("reply_to_email_addresses", uselist=False))
|
||||
service = db.relationship(Service, backref=db.backref("reply_to_email_addresses"))
|
||||
|
||||
email_address = db.Column(db.Text, nullable=False, index=False, unique=False)
|
||||
is_default = db.Column(db.Boolean, nullable=False, default=True)
|
||||
|
||||
@@ -203,7 +203,8 @@ class ServiceSchema(BaseSchema):
|
||||
'service_provider_stats',
|
||||
'service_notification_stats',
|
||||
'service_sms_senders',
|
||||
'monthly_billing'
|
||||
'monthly_billing',
|
||||
'reply_to_email_addresses',
|
||||
)
|
||||
strict = True
|
||||
|
||||
@@ -256,7 +257,8 @@ class DetailedServiceSchema(BaseSchema):
|
||||
'service_notification_stats',
|
||||
'organisation',
|
||||
'service_sms_senders',
|
||||
'monthly_billing'
|
||||
'monthly_billing',
|
||||
'reply_to_email_addresses'
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ email_content = {
|
||||
|
||||
post_email_response = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"description": "POST sms notification response schema",
|
||||
"description": "POST email notification response schema",
|
||||
"type": "object",
|
||||
"title": "response v2/notifications/email",
|
||||
"properties": {
|
||||
|
||||
@@ -88,7 +88,7 @@ def post_notification(notification_type):
|
||||
create_resp_partial = functools.partial(
|
||||
create_post_email_response_from_notification,
|
||||
subject=template_with_content.subject,
|
||||
email_from=authenticated_service.email_from
|
||||
email_from='{}@{}'.format(authenticated_service.email_from, current_app.config['NOTIFY_EMAIL_DOMAIN'])
|
||||
)
|
||||
elif notification_type == LETTER_TYPE:
|
||||
create_resp_partial = functools.partial(
|
||||
|
||||
Reference in New Issue
Block a user