Skip to content

Commit

Permalink
Remove hardcoded user, add mongoclaim to gcloud config
Browse files Browse the repository at this point in the history
  • Loading branch information
RawToast committed Apr 7, 2018
1 parent 5617689 commit 682dc7d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dokusho/src/app/Actions.re
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ open Client;
open Types;

module Actions = {
let addNewEntry = (pageType, count) => ReasonReact.SideEffects(
let addNewEntry = (userId, pageType, count) => ReasonReact.SideEffects(
( self =>
Js.Promise.(
Client.newEntry(Types.testUser, pageType, count)
Client.newEntry(userId, pageType, count)
|> then_((serverResponse: serverResponse) => {
self.send(UpdateHistory(serverResponse.readingHistory.days));
resolve(serverResponse);
Expand Down
2 changes: 1 addition & 1 deletion dokusho/src/app/Client.re
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Client = {
open Dom.Storage;

let accessToken = (default) => sessionStorage |> getItem("accessToken") |> Rationale.Option.default(default);
let backendURI = "http://35.189.70.144:8080";
let backendURI = "http://35.197.251.200:8080";
let jsonHeader = Fetch.HeadersInit.make({"Content-Type": "application/json"});
let authHeader = (default) => Fetch.HeadersInit.makeWithArray([|( "Content-Type", "application/json" ), ( "accessToken", accessToken(default) )|]);

Expand Down
2 changes: 1 addition & 1 deletion dokusho/src/app/Dokusho.re
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Dokusho {
| ChangeSelection(pageType) =>
ReasonReact.Update({readingData: readingData, selectedEntry: pageType, selectedDate: selectedDate});
| AddEntry(pageType, count) =>
Actions.addNewEntry(pageType, count);
Actions.addNewEntry(token, pageType, count);
| UpdateHistory(days) =>
ReasonReact.Update({readingData: {days: days}, selectedEntry: selectedEntry, selectedDate: selectedDate});
| LoadUserData(userId) =>
Expand Down
3 changes: 0 additions & 3 deletions dokusho/src/app/Types.re
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* TODO: Remove this for real authentication */
let testUser = "fully";

module Routes {
type route =
| Home(string)
Expand Down
10 changes: 10 additions & 0 deletions kube/gcloud/mongo-claim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mongo-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

0 comments on commit 682dc7d

Please sign in to comment.