diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-26 13:43:55 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-26 13:43:55 -0400 |
commit | 204cf12ced54581b97fff1ba11be429be88b6ade (patch) | |
tree | e6d6ecff5db3692ef1f492c6c1866b0f34c5c156 /src/Utils.ts | |
parent | 8cbc191b560684f4da32ca0320115974cad41808 (diff) | |
parent | 9b27f1ace4655f71a67ad68e1f6f6bba82f41e46 (diff) |
Merge branch 'googlephotos_sharing' of https://github.com/browngraphicslab/Dash-Web into googlephotos_sharing_master
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index 6489eff77..5f06b5cec 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -4,6 +4,7 @@ import { Socket } from 'socket.io'; import { Message } from './server/Message'; import { RouteStore } from './server/RouteStore'; import requestPromise = require('request-promise'); +import { CurrentUserUtils } from './server/authentication/models/current_user_utils'; export class Utils { @@ -292,12 +293,13 @@ export namespace JSONUtils { } -export function PostToServer(relativeRoute: string, body: any) { +export function PostToServer(relativeRoute: string, body?: any) { + body = { userId: CurrentUserUtils.id, ...body }; let options = { method: "POST", uri: Utils.prepend(relativeRoute), json: true, - body: body + body }; return requestPromise.post(options); }
\ No newline at end of file |