This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AppState } from 'react-native'; | |
import { setError, clearError } from '../reducers/error'; | |
import { updateEventStatus } from '../reducers/event_details'; | |
import { setAlert } from '../reducers/alert'; | |
import { ws_url } from '../api/urls'; | |
import handleOnMessage, { UPDATE_EVENT_DETAILS, SET_EVENT_STATUS } from './handleOnMessage'; | |
import * as r from '../scenes/scene_names/routes'; | |
import store from '../store/store'; | |
//Socket connection readyStates are integers that correlate to these values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let conn = new WebSocket(ws_url); | |
function setAppStateHandler() { | |
AppState.addEventListener('change', cstate => { | |
if(cstate === 'active') { | |
connectWS() | |
} | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import ( | |
"fmt" | |
"mobilebid/billable" | |
db "mobilebid/database" | |
"mobilebid/stripe" | |
"net/http" | |
"os" | |
"strconv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package routes | |
import ( | |
"github.com/auth0/go-jwt-middleware" | |
"github.com/codegangsta/negroni" | |
jwt "github.com/dgrijalva/jwt-go" | |
"github.com/gorilla/mux" | |
. "mobilebid/controllers" | |
"net/http" | |
"encoding/base64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package routes | |
import ( | |
"encoding/base64" | |
. "mobilebid/controllers" | |
"net/http" | |
"os" | |
db "mobilebid/database" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package database | |
import ( | |
"database/sql" | |
"time" | |
"github.com/lib/pq" | |
) | |
// DBUser is the main DB User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var router = express.Router(); | |
var passport = require('passport'); | |
var uaction = require('../models/uaction'); | |
/* GET home page. */ | |
router.get('/', uaction.index); | |
router.route('/register') | |
.get(uaction.registerGet) |
NewerOlder