aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorNassim Bounouas <NassimBounouas@users.noreply.github.com>2019-06-21 08:49:35 +0200
committerChocobozzz <me@florianbigard.com>2019-06-21 08:49:35 +0200
commit4e9fa5b7e9ca6030a5fe2e9b0520bf8fa18e5877 (patch)
treef7fb09aa655f954b8d9833cd2215f6fada5721a6 /shared
parentd1ea2a988d05e1eca4066efb99c5f943f5267a78 (diff)
downloadPeerTube-4e9fa5b7e9ca6030a5fe2e9b0520bf8fa18e5877.tar.gz
PeerTube-4e9fa5b7e9ca6030a5fe2e9b0520bf8fa18e5877.tar.zst
PeerTube-4e9fa5b7e9ca6030a5fe2e9b0520bf8fa18e5877.zip
Feature/subject in contact form (#1926)
* #1915 Add a subject to contact form and add it to email sent * #1915 Add subject to contact form tests * #1915 Contact form test corrected && tslint correction
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/server/contact-form.ts2
-rw-r--r--shared/models/server/contact-form.model.ts1
2 files changed, 3 insertions, 0 deletions
diff --git a/shared/extra-utils/server/contact-form.ts b/shared/extra-utils/server/contact-form.ts
index 80394cf99..e002e03dd 100644
--- a/shared/extra-utils/server/contact-form.ts
+++ b/shared/extra-utils/server/contact-form.ts
@@ -5,6 +5,7 @@ function sendContactForm (options: {
5 url: string, 5 url: string,
6 fromEmail: string, 6 fromEmail: string,
7 fromName: string, 7 fromName: string,
8 subject: string,
8 body: string, 9 body: string,
9 expectedStatus?: number 10 expectedStatus?: number
10}) { 11}) {
@@ -13,6 +14,7 @@ function sendContactForm (options: {
13 const body: ContactForm = { 14 const body: ContactForm = {
14 fromEmail: options.fromEmail, 15 fromEmail: options.fromEmail,
15 fromName: options.fromName, 16 fromName: options.fromName,
17 subject: options.subject,
16 body: options.body 18 body: options.body
17 } 19 }
18 return request(options.url) 20 return request(options.url)
diff --git a/shared/models/server/contact-form.model.ts b/shared/models/server/contact-form.model.ts
index 0696be8b4..c23e6d1ba 100644
--- a/shared/models/server/contact-form.model.ts
+++ b/shared/models/server/contact-form.model.ts
@@ -1,5 +1,6 @@
1export interface ContactForm { 1export interface ContactForm {
2 fromEmail: string 2 fromEmail: string
3 fromName: string 3 fromName: string
4 subject: string
4 body: string 5 body: string
5} 6}