diff options
| author | jackyzha0 <[email protected]> | 2020-07-18 14:51:54 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2020-07-18 14:51:54 -0700 |
| commit | d80bc9f45c4ab06a8a8bc38fc436bb5345225514 (patch) | |
| tree | e4d0317c70fe487ec85530b65e51982ead61e80a /frontend/src/helpers/httpHelper.js | |
| parent | refactor renderers (diff) | |
| download | ctrl-v-d80bc9f45c4ab06a8a8bc38fc436bb5345225514.tar.xz ctrl-v-d80bc9f45c4ab06a8a8bc38fc436bb5345225514.zip | |
refactor newpaste
Diffstat (limited to 'frontend/src/helpers/httpHelper.js')
| -rw-r--r-- | frontend/src/helpers/httpHelper.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/frontend/src/helpers/httpHelper.js b/frontend/src/helpers/httpHelper.js index ca77ed7..99b9513 100644 --- a/frontend/src/helpers/httpHelper.js +++ b/frontend/src/helpers/httpHelper.js @@ -21,13 +21,13 @@ export function FetchPasswordPaste(hash, pass) { }) } -export function PostNewPaste(state) { +export function PostNewPaste(title, content, language, pass, expiry) { var bodyFormData = new FormData(); - bodyFormData.set('title', state.title); - bodyFormData.set('content', state.content); - bodyFormData.set('language', state.language); - bodyFormData.set('password', state.pass); - bodyFormData.set('expiry', parseExpiry(state.expiry)); + bodyFormData.set('title', title); + bodyFormData.set('content', content); + bodyFormData.set('language', language); + bodyFormData.set('password', pass); + bodyFormData.set('expiry', parseExpiry(expiry)); return axios({ method: 'post', |