client/src/actions/userActions.js
author ymh <ymh.work@gmail.com>
Fri, 30 Nov 2018 10:53:15 +0100
changeset 183 f8f3af9e5c83
parent 72 7634b424f426
permissions -rw-r--r--
Change the settings to avoid using Session authentication for rest framework as it raise exceptions in case client and backend are on the same domain On the filter, adapt to take into account new version of django_filters
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     1
import * as types from '../constants/actionTypes';
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     2
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     3
export const updateSettings = (username, firstname, lastname) => {
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     4
  return {
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     5
    type: types.USER_UPDATE_SETTINGS_ASYNC,
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     6
    username,
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     7
    firstname,
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     8
    lastname
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     9
  };
d8588379529e Add settings page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    10
}
72
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents: 53
diff changeset
    11
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents: 53
diff changeset
    12
export const setAutoSubmit = (value) => {
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents: 53
diff changeset
    13
  return {
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents: 53
diff changeset
    14
    type: types.USER_TOGGLE_AUTO_SUBMIT,
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents: 53
diff changeset
    15
    value
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents: 53
diff changeset
    16
  };
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents: 53
diff changeset
    17
}