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 Apollo Azure integration library | |
const { ApolloServer, gql } = require('apollo-server-azure-functions'); | |
const { CosmosClient } = require('@azure/cosmos'); | |
// Add correct values to each variable | |
const connectionString = "ADD_CONNECTION_STRING"; | |
const databaseName = "ADD_DATABASE_NAME"; | |
const containerName = "ADD_CONTAINER_NAME"; | |
// Create connection to Cosmo DB |
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 Apollo Azure integration library | |
const { ApolloServer, gql } = require('apollo-server-azure-functions'); | |
// Construct a schema, using GraphQL schema language | |
const typeDefs = gql` | |
type Query { | |
hello: String | |
} | |
`; |
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 expect = require('chai').expect; | |
describe('Simple App testing', () => { | |
// Adding time out to make sure the app is load prior to test is run | |
beforeEach(() => { | |
$("~app-root").waitForDisplayed(11000, false) | |
}); | |
it('Valid Login Test', async => { |
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 React, { Component } from 'react'; | |
import { TouchableHighlight, StyleSheet, Text, TextInput, View } from 'react-native'; | |
export default class App extends Component { | |
constructor() { | |
super() | |
this.state = { | |
username: '', | |
password: '', | |
isLogined: false |
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 actualPassword = [], | |
temperoryPassword, | |
currentCursorPosition = 0, | |
passwordChar = '•'; | |
$("#password-text").bind("input", function () { | |
temperoryPassword = $(this).val(); | |
var passwordLength = temperoryPassword.length; | |
for (var i = 0; i < passwordLength; i++) { |
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
<ion-header hideBackButton="true"> | |
<ion-navbar> | |
<ion-title>Upload Image</ion-title> | |
</ion-navbar> | |
</ion-header> | |
<ion-content padding> | |
<img [src]="imageView" *ngIf="imageView" /> | |
<ion-row> | |
<ion-col> |
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
uploadPhoto() { | |
let loading = this.loader.create({ | |
title: 'Wait', | |
subTitle: 'Uploading...' | |
}); | |
loading.present(); | |
this.cognitoService | |
.getLoggedUser() | |
.then(userToken => { |
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
openCamera() { | |
this.platform.ready().then(readySource => { | |
const options: CameraOptions = { | |
quality: 100, | |
destinationType: this.camera.DestinationType.DATA_URL, | |
encodingType: this.camera.EncodingType.JPEG, | |
mediaType: this.camera.MediaType.PICTURE | |
}; | |
this.camera.getPicture(options).then( |
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
upload(image, imageName, accessToken) { | |
return new Promise((resolve, reject) => { | |
aws.config.region = this.SYSTEM_VARIABLE.REGION; | |
aws.config.credentials = new aws.CognitoIdentityCredentials({ | |
IdentityPoolId: this.SYSTEM_VARIABLE.COGNITO_IDENTITY.IDENTITY_POOL_ID, | |
Logins: { | |
"cognito-idp.<REGION_NAME>.amazonaws.com/<USER_POOL_ID>": accessToken | |
} | |
}); |
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 { Component } from "@angular/core"; | |
import { NavController, NavParams, LoadingController } from "ionic-angular"; | |
import { CognitoServiceProvider } from "../../providers/cognito-service/cognito-service"; | |
import { SignUpPage } from "../../pages/sign-up/sign-up"; | |
import { ImageUploadPage } from "../../pages/image-upload/image-upload"; | |
@Component({ | |
selector: "page-login", | |
templateUrl: "login.html" | |
}) |
NewerOlder