diff options
author | 2020-11-27 00:38:22 +0100 | |
---|---|---|
committer | 2020-11-27 00:38:22 +0100 | |
commit | 5bc2917e78c133cd8966a65aa200588eb6d7c0d6 (patch) | |
tree | 1ab1f1837932b45092a7207af99c3a6cefed5e73 /client/src/admin/api/setDbLang.js | |
parent | f2fcc41cb17ece1fc5acf57809c5e3d61c236133 (diff) | |
download | website_creator-5bc2917e78c133cd8966a65aa200588eb6d7c0d6.tar.gz website_creator-5bc2917e78c133cd8966a65aa200588eb6d7c0d6.tar.bz2 website_creator-5bc2917e78c133cd8966a65aa200588eb6d7c0d6.zip |
save language in login & admin apps
Diffstat (limited to 'client/src/admin/api/setDbLang.js')
-rw-r--r-- | client/src/admin/api/setDbLang.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/admin/api/setDbLang.js b/client/src/admin/api/setDbLang.js new file mode 100644 index 0000000..e48f6d1 --- /dev/null +++ b/client/src/admin/api/setDbLang.js @@ -0,0 +1,10 @@ +export default (language) => ( + fetch('/api/user/language', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ language }), + }) + .catch(() => {}) +); |