actions.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * <<
  3. * Davinci
  4. * ==
  5. * Copyright (C) 2016 - 2017 EDP
  6. * ==
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. * >>
  19. */
  20. import {
  21. SIGNUP,
  22. SIGNUP_SUCCESS,
  23. SIGNUP_ERROR,
  24. SEND_MAIL_AGAIN,
  25. SEND_MAIL_AGAIN_SUCCESS,
  26. SEND_MAIL_AGAIN_ERROR
  27. } from './constants'
  28. export function signup (username, email, password, resolve) {
  29. return {
  30. type: SIGNUP,
  31. payload: {
  32. username,
  33. email,
  34. password,
  35. resolve
  36. }
  37. }
  38. }
  39. export function signupSuccess () {
  40. return {
  41. type: SIGNUP_SUCCESS
  42. }
  43. }
  44. export function signupError () {
  45. return {
  46. type: SIGNUP_ERROR
  47. }
  48. }
  49. export function sendMailAgain (email, resolve) {
  50. return {
  51. type: SEND_MAIL_AGAIN,
  52. payload: {
  53. email,
  54. resolve
  55. }
  56. }
  57. }
  58. export function sendMailAgainSuccess () {
  59. return {
  60. type: SEND_MAIL_AGAIN_SUCCESS
  61. }
  62. }
  63. export function sendMailAgainFail () {
  64. return {
  65. type: SEND_MAIL_AGAIN_ERROR
  66. }
  67. }