Download client/src/actions/user.js from linuxrun/deer: direct link, hf CLI and curl.
- Browser
- Download file 376 Bytes
-
https://huggingface.co/spaces/linuxrun/deer/resolve/main/client/src/actions/user.js
- Command line
-
hf download hf://spaces/linuxrun/deer/client/src/actions/user.js
-
curl -L -o user.js https://huggingface.co/spaces/linuxrun/deer/resolve/main/client/src/actions/user.js
376 Bytes
| import axios from 'axios'; | |
| import * as types from '../common/actionTypes'; | |
| export function sendHello (msg, callback = () => {}) { | |
| return (dispatch) => { | |
| axios.post('/api/hello', { | |
| msg, | |
| }) | |
| .then((res) => { | |
| console.log('## res is: ', res.data) | |
| dispatch({ | |
| type: types.UPDATE_HELLO_MSG, | |
| payload: res.data, | |
| }); | |
| }); | |
| }; | |
| } | |