Select key value javascript param comment - javascript

So I'm trying to make it so the user doesn't have to type in a value only select. For better understand this is what I mean.
But when I try running it is get this
Promise { 'Isekai' }
{ error: true, error_message: 'This genre does not exist.' }
index.d.ts file:
interface fetchAnimeByGenre {
animeTitle: string,
animeId: string,
animeImg: string,
animeSeason: string,
score: number
}
function fetchAnimeByGenre(genre:'Action' | 'Adventure' | 'Anti-Hero' | 'CGDCT' | 'College'): Array<fetchAnimeByGenre>;
const GENRES = [
'Action', 'Adventure', 'Anti-Hero', 'CGDCT',.....];
if (!genre) {
return {
error: true,
error_message: "No genre provided"
}
};
var list = []
if (genre.toLowerCase() === "anti-hero") {
genre = "Anti-Hero"
} else if (genre.toLowerCase() === "cgdct") {
genre = "CGDCT"
} else {
genre = firstLetterToUpperCase(genre);
}
if (!GENRES.includes(genre)) {
return {
error: true,
error_message: "This genre does not exist."
}
};
const res = await axios.request({
url: animixBase + "api/search",
method: 'POST',
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": USER_AGENT
},
data: new URLSearchParams({ genre, minstr: 99999999, orderby: "popular" })
});
res.data.result.map((anime) => {
list.push({
animeTitle: anime.title,
animeId: anime.url.split("/v1/")[1],
animeImg: anime.picture,
animeSeason: anime.infotext,
score: anime.score / 100
})
});
return list;
Is there any way I can fix this? (side note: I am fairly new to this d.ts stuff so)

Related

How to use bitquery gql with javascript to get price of a crypto coin

I'm trying to get the price of a crypto coin using bitquery gql. I'm a total beginer.
I have a query that is working, and a node server.
My js code is in app.js and when i run node app.js, i get: { data: { ethereum: { dexTrades: [Array] } } } i don't know what this means... Is my information inside of that array, or is it just not working properly? How do i go about getting just the "quotePrice" part of my query into a variable?
This is my query that works on graphql.bitquery.io/ide :
{
ethereum(network: bsc) {
dexTrades(
options: {limit: 1, asc: "timeInterval.minute"}
date: {since: "2020-11-01"}
exchangeName: {in: ["Pancake", "Pancake v2"]}
baseCurrency: {is: "0x860947ae09058cc028aaf2ac75258060c61f2dfd"}
quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
) {
timeInterval {
minute(count: 5)
}
baseCurrency {
symbol
address
}
baseAmount
quoteCurrency {
symbol
address
}
quoteAmount
trades: count
quotePrice
maximum_price: quotePrice(calculate: maximum)
minimum_price: quotePrice(calculate: minimum)
open_price: minimum(of: block, get: quote_price)
close_price: maximum(of: block, get: quote_price)
}
}
}
Here is my app.js file:
import fetch from "node-fetch";
const query = `
{
ethereum(network: bsc) {
dexTrades(
options: {limit: 1, asc: "timeInterval.minute"}
date: {since: "2020-11-01"}
exchangeName: {in: ["Pancake", "Pancake v2"]}
baseCurrency: {is: "0x860947ae09058cc028aaf2ac75258060c61f2dfd"}
quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
) {
timeInterval {
minute(count: 5)
}
baseCurrency {
symbol
address
}
baseAmount
quoteCurrency {
symbol
address
}
quoteAmount
trades: count
quotePrice
maximum_price: quotePrice(calculate: maximum)
minimum_price: quotePrice(calculate: minimum)
open_price: minimum(of: block, get: quote_price)
close_price: maximum(of: block, get: quote_price)
}
}
}
`;
const url = "https://graphql.bitquery.io/";
const opts = {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": " my bitquery api key "
},
body: JSON.stringify({
query
})
};
fetch(url, opts)
.then(res => res.json())
.then(console.log)
.catch(console.error);

mobx-state-tree error while converting to anonymousModel

What should happen - succesfully create RootStore from defaultSnapshot and reset it when needed, successful backcuping in localStorage.
What happens - getting an error while trying to apply a snapshot, when attempting to open page, just by running code even without interacting with it.
When checking types manually I do not see problems with type mistakes, so can not understand why it throws error.
Codesandox live minimum code
Error
Error: [mobx-state-tree] Error while converting `{"token":"","myInnerInfo":{"login":"","type":""},"myDisplayInfo":{"login":"","type":""},"loginInfo":{"login":"","type":""},"loginList":[],"loading":false,"logined":false}` to `AnonymousModel`:
at path "/myInnerInfo/login" value `""` is not assignable to type: `AnonymousModel` (Value is not a plain object).
at path "/myInnerInfo/type" value `""` is not assignable to type: `AnonymousModel` (Value is not a plain object).
at path "/myDisplayInfo/login" value `""` is not assignable to type: `AnonymousModel` (Value is not a plain object).
at path "/myDisplayInfo/type" value `""` is not assignable to type: `AnonymousModel` (Value is not a plain object).
at path "/loginInfo/login" value `""` is not assignable to type: `AnonymousModel` (Value is not a plain object).
at path "/loginInfo/type" value `""` is not assignable to type: `AnonymousModel` (Value is not a plain object).
File structure
store.js (imported in index.js)
import { types, flow, onSnapshot, applySnapshot } from 'mobx-state-tree';
import { values } from 'mobx';
import axios from 'axios';
const defaultSnapshot = {
token: '',
myInnerInfo: { login: '', type: '' },
myDisplayInfo: { login: '', type: '' },
loginInfo: { login: '', type: '' },
loginList: [],
loading: false,
logined: false,
}
const User = types
.model({
login: '',
type: '',
}).actions(self => ({
setUserInfo({ login, type }) {
self.login = login;
self.type = type;
}
}))
const RootStore = types
.model({
token: '',
myInnerInfo: types.map(User),
myDisplayInfo: types.map(User),
loginInfo: types.map(User),
loginList: types.array(types.string),
loading: false,
logined: false,
}).views(self => ({
get loginListLength() {
return values(self.loginList).length;
},
})).actions(self => ({
// setToken (token) {
// self.token = token;
// },
// setMyInnerInfo (userInfo) {
// self.myInnerInfo.setUserInfo(userInfo);
// },
// setMyDisplayInfo (userInfo) {
// self.myDisplayInfo.setUserInfo(userInfo);
// },
// setLoginInfo (userInfo) {
// self.loginInfo.setUserInfo(userInfo);
// },
// setLoginList (loginList) {
// self.loginList = loginList;
// },
// setLoading (loading) {
// self.loading = loading;
// },
// setLogined (logined) {
// self.logined = logined;
// },
// reset() {
// self.token = '';
// self.myInnerInfo = User.create({});
// self.myDisplayInfo = User.create({});
// self.loginInfo = User.create({});
// self.loginList = [];
// self.loading = false;
// self.logined = false;
// },
register: flow(function* register(login, password) {
self.loading = true;
try {
const res = yield axios({
method: 'POST',
url: `${process.env.REACT_APP_HOST}/users/register`,
data: { login, password },
});
alert('Registered');
self.loading=false;
} catch (e) {
console.error(e);
alert(`Error registering! Please retry!`);
resetStore();
}
}),
login: flow(function* login(login, password) {
self.loading = true;
try {
const res = yield axios({
method: 'POST',
url: `${process.env.REACT_APP_HOST}/users/login`,
data: { login, password },
});
self.token = res.data.token;
self.myInnerInfo.setUserInfo(res.data.user);
self.myDisplayInfo.setUserInfo({ login: '', type: '' });
self.loginInfo.setUserInfo({ login: '', type: '' });
self.loginList = [];
alert('Logined');
self.logined = true;
self.loading=false;
} catch (e) {
console.error(e);
alert(`Error logining! Please retry!`);
resetStore();
}
}),
unlogin() {
self.loading = true;
self.logined = false;
self.token = '';
self.myInnerInfo.setUserInfo({ login: '', type: '' });
self.myDisplayInfo.setUserInfo({ login: '', type: '' });
self.loginInfo.setUserInfo({ login: '', type: '' });
self.loginList = [];
alert('Unlogined');
self.loading=false;
},
getMyInfo: flow(function* getMyInfo() {
self.loading = true;
try {
const res = yield axios({
method: 'GET',
url: `${process.env.REACT_APP_HOST}/users/my-info`,
headers: {'Authorization': self.token ? `Bearer ${self.token}` : ''},
});
// self.token = res.data.token;
// self.myInnerInfo.setUserInfo(res.data.user);
self.myDisplayInfo.setUserInfo(res.data);
// self.loginInfo.setUserInfo({});
// self.loginList = [];
alert('Loaded information');
// self.logined = true;
self.loading=false;
} catch (e) {
console.error(e);
alert(`Error loading information! Please retry!`);
resetStore();
}
}),
getLoginList: flow(function* getLoginList() {
self.loading = true;
try {
const res = yield axios({
method: 'GET',
url: `${process.env.REACT_APP_HOST}/users/list-logins`,
headers: {'Authorization': self.token ? `Bearer ${self.token}` : ''},
});
// self.token = res.data.token;
// self.myInnerInfo.setUserInfo(res.data.user);
// self.myDisplayInfo.setUserInfo(res.data);
// self.loginInfo.setUserInfo({});
self.loginList = res;
alert('Loaded list');
// self.logined = true;
self.loading=false;
} catch (e) {
console.error(e);
alert(`Error loading list! Please retry!`);
resetStore();
}
}),
getUserInfo: flow(function* getUserInfo(login) {
self.loading = true;
try {
const res = yield axios({
method: 'GET',
url: `${process.env.REACT_APP_HOST}/users/my-info/${login}`,
headers: {'Authorization': self.token ? `Bearer ${self.token}` : ''},
});
// self.token = res.data.token;
// self.myInnerInfo.setUserInfo(res.data.user);
// self.myDisplayInfo.setUserInfo(res.data);
self.loginInfo.setUserInfo(res.data);
// self.loginList = [];
alert('Loaded information');
// self.logined = true;
self.loading=false;
} catch (e) {
console.error(e);
alert(`Error loading information! Please retry!`);
resetStore();
}
}),
}));
const store = RootStore.create();
if(!(localStorage[process.env.REACT_APP_LOCALSTORAGE_KEY] && JSON.parse(localStorage[process.env.REACT_APP_LOCALSTORAGE_KEY]))) {
localStorage[process.env.REACT_APP_LOCALSTORAGE_KEY] = JSON.stringify(defaultSnapshot);
}
applySnapshot(store, JSON.parse(localStorage[process.env.REACT_APP_LOCALSTORAGE_KEY]));
onSnapshot(store, snapshot => {
localStorage[process.env.REACT_APP_LOCALSTORAGE_KEY] = JSON.stringify(snapshot);
console.info(snapshot);
});
export default store;
export function resetStore() {
localStorage[process.env.REACT_APP_LOCALSTORAGE_KEY] = JSON.stringify(defaultSnapshot);
applySnapshot(store, JSON.parse(localStorage[process.env.REACT_APP_LOCALSTORAGE_KEY]));
}
package.json
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.9",
"#testing-library/react": "^11.2.3",
"#testing-library/user-event": "^12.6.0",
"axios": "^0.21.1",
"mobx": "^6.0.4",
"mobx-react": "^7.0.5",
"mobx-state-tree": "^5.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
It appears that your defaultSnapshot does not match your defined model structure.
You define your default snapshot as follows:
const defaultSnapshot = {
token: '',
myInnerInfo: { login: '', type: '' },
myDisplayInfo: { login: '', type: '' },
loginInfo: { login: '', type: '' },
loginList: [],
loading: false,
logined: false,
}
However, if you getSnapshot of your store after you create it with no arguments, you get:
{
token: "",
myInnerInfo: {},
myDisplayInfo: {},
loginInfo: {},
loginList: [],
loading: false,
logined: false
}
Which would be a "default snapshot" in the sense that it is what happens when you create your store with no specific data.
Now this looks like the two should be compatible, except that you defined the three Info fields as maps. Maps of models look like this:
{
"<id>": { <model snapshot> },
…
}
Therefore, when loading your default snapshot, it causes an error because it tries to treat what you intended to be model data as map data - it thinks you have a collections of two Users with keys of login and type, and values of "", instead of objects compatible with User. For instance,
…
myInnerInfo: {
login: { login: 'some user data', type:'' },
type: { login: 'another user data', type:'' }
},
…
Would work, but doesn't seem like what you intended.
What you probably intended to do was make the Info fields directly of the User type, not a map of the User type, or perhaps an optional or the User type, since then you don't need to specify a User when creating the store. So perhaps your store model should look like this:
.model({
token: '',
myInnerInfo: types.optional(User, {}),
myDisplayInfo: types.optional(User, {}),
loginInfo: types.optional(User, {}),
loginList: types.array(types.string),
loading: false,
logined: false,
})
This structure is compatible with your default snapshot, and does not require values when creating the store.
Note that primitive values are automatically optional, but models are not (hence why the explicit optional call). An optional parameter has a default value, but will still exist. It just does not need to be explicitly defined at create time. Also, be sure to reset your localStorage when testing, or it may seem like it didn't work...

How to access array elements that are defined in another array of Mongoose scheme object Array?

This is the User schema in mongoose:
var userSchema = new mongoose.Schema({
email: {
type: String,
unique: true,
required: true,
},
name: {
type: String,
required: true,
},
Addtasks: [
{
topic: String,
words: Number,
keywords: String,
website: String,
otherdetails: String,
exampleRadios: String,
deadline: Date,
Date: String,
fileName: String,
Bigpaths: [],
},
],
});
module.exports = mongoose.model('User', userSchema);
I want to use/access the Bigpaths array, which is defined inside the Addtasks array, which is defined in User. Data is already are there in mongoDB, which I have inserted via UI page. I am trying the following code but I am getting this error in console:
data.Addtasks[Object.keys(data.Addtasks).length - 2].Bigpaths.forEach(
(element) => {
// ...
}
)
as
TypeError: Cannot read property 'Bigpaths' of undefined
at \Desktop\grumpytext\routes\index.js:99:71
Code:
const { files } = req;
User.findOne({ email: req.user.email }, function (error, data) {
if (error) {
console.log('Three');
} else if (data) {
if (Object.keys(data.Addtasks).length > 1) {
data.Addtasks[Object.keys(data.Addtasks).length - 2].Bigpaths.forEach(
(element) => {
files.forEach((currentElement) => {
if (element.name == currentElement.filename) {
files.pull(currentElement.filename);
}
});
}
);
}
}
});
How to resolve this error or how to access all the elements of Bigpaths array so that I can iterate it with forEach loop?
I'm not sure here, but I think you need to populate Addtasks prior to manipulating it:
const files = req.files;
User.findOne({email:req.user.email}).populate('Addtasks').exec((error, data) => {
if (error) {
console.log("Three");
}
else
{
if(data)
{
if(Object.keys(data.Addtasks).length > 1)
{
console.log("Addtasks count: " + Object.keys(data.Addtasks).length);
data.Addtasks[Object.keys(data.Addtasks).length - 2].Bigpaths.forEach(element => {
files.forEach(currentElement => {
if(element.name == currentElement.filename)
{
files.pull(currentElement.filename);
}
})
});
}
}
}
});
Please notice the log console.log("Addtasks count: " + Object.keys(data.Addtasks).length); - in case the solution does not work, I advise to add some prints, especially to check if the count of elements is as expected or properties within an object are fine.

GraphQL, Mysql equivalent OR operation

I have just learnt GraphQL and I want to find the user id=2 OR user id=3 now how will I make the GraphQL query,I am getting the whole set using the bellow query
{
users() {
id
username
posts {
title
tags {
name
}
}
}
}
2nd issue --
{
people(id:[1,2,3]) {
id
username
posts(id:2) {
title
tags {
name
}
}
}
}
if I add the arg on Posts filed then i got an error msg "Unknown argument id on field posts of type user"
This is my Schema js file
var graphql = require('graphql');
var Db = require('./db');
var users = new graphql.GraphQLObjectType({
name : 'user',
description : 'this is user info',
fields : function(){
return {
id :{
type : graphql.GraphQLInt,
resolve(user){
return user.id;
}
},
username :{
type : graphql.GraphQLString,
resolve(user){
return user.username;
}
},
posts:{
id:{
type : graphql.GraphQLString,
resolve(post){
return post.id;
}
},
type: new graphql.GraphQLList(posts),
resolve(user){
return user.getPosts();
}
}
}
}
});
var posts = new graphql.GraphQLObjectType({
name : 'Posts',
description : 'this is post info',
fields : function(){
return {
id :{
type : graphql.GraphQLInt,
resolve(post){
return post.id;
}
},
title :{
type : graphql.GraphQLString,
resolve(post){
return post.title;
}
},
content:{
type : graphql.GraphQLString,
resolve(post){
return post.content;
}
},
person :{
type: users,
resolve(post){
return post.getUser();
}
},
tags :{
type: new graphql.GraphQLList(tags),
resolve(post){
return post.getTags();
}
}
}
}
});
var tags = new graphql.GraphQLObjectType({
name : 'Tags',
description : 'this is Tags info',
fields : function(){
return {
id :{
type : graphql.GraphQLInt,
resolve(tag){
return tag.id;
}
},
name:{
type : graphql.GraphQLString,
resolve(tag){
return tag.name;
}
},
posts :{
type: new graphql.GraphQLList(posts),
resolve(tag){
return tag.getPosts();
}
}
}
}
});
var query = new graphql.GraphQLObjectType({
name : 'query',
description : 'Root query',
fields : function(){
return {
people :{
type : new graphql.GraphQLList(users),
args :{
id:{type: new graphql.GraphQLList(graphql.GraphQLInt)},
username:{
type: graphql.GraphQLString
}
},
resolve(root,args){
return Db.models.user.findAll({where:args});
}
},
posts:{
type : new graphql.GraphQLList(posts),
args :{
id:{
type: graphql.GraphQLInt
},
title:{
type: graphql.GraphQLString
},
},
resolve(root,args){
return Db.models.post.findAll({where:args});
}
},
tags :{
type : new graphql.GraphQLList(tags),
args :{
id:{
type: graphql.GraphQLInt
},
name:{
type: graphql.GraphQLString
},
},
resolve(root,args){
return Db.models.tag.findAll({where:args});
}
}
}
}
});
var Mutation = new graphql.GraphQLObjectType({
name : "mutation",
description : 'function for mutaion',
fields : function(){
return {
addPerson : {
type : users,
args :{
username : {
type : new graphql.GraphQLNonNull(graphql.GraphQLString)
},
email :{
type : new graphql.GraphQLNonNull(graphql.GraphQLString)
}
},
resolve(_, args){
return Db.models.user.create({
username : args.username,
email : args.email
});
}
}
}
}
})
var Schama = new graphql.GraphQLSchema({
query : query,
mutation : Mutation
})
module.exports = Schama;
In order to fetch multiple data from your schema using an array of ids you should define the args given to the users in your schema as follows:
fields: () => ({
users: {
type: new GraphQLList(USER_GRAPHQL_OBJECT_TYPE),
args: {
id: {type: new GraphQLList(GraphQLInt)}
},
resolve: (root, args) => {
// fetch users
}
}
})
notice the new GraphQLList wrapping the GraphQLInt type of the id.
Then, when querying your schema you can :
{
users(id: [2, 3]) {
id
username
posts {
title
tags {
name
}
}
}
}
Please let me know if it was helpful :)

Sequelize associations: set[Models] adds new models instead of associating existing ones

I'm using Sequelize and I'm trying to create associations between two different tables, where x.belongsTo(y) and y.hasMany(x). After having done x.setY(yInstance) and y.getXs() it seems only new rows have been added to x and no associations to my already created instances have been created.
var Promise = require("bluebird"),
Sequelize = require("sequelize");
var sequelize = new Sequelize("Test", "postgres", "password", {
host: "localhost",
dialect: "postgres",
pool: {
max: 5,
min: 0,
idle: 10000
}
});
var Schedule = sequelize.define("Schedule", {
website: {
type: Sequelize.STRING
}
});
var SiteConfig = sequelize.define("SiteConfig", {
systemType: {
type: Sequelize.STRING
}
});
var Selector = sequelize.define("Selector", {
type: {
type: Sequelize.STRING
},
content: {
type: Sequelize.STRING
}
});
Selector.belongsTo(SiteConfig);
SiteConfig.hasMany(Selector);
var testSchedule = {
website: "google.com"
};
var testSiteConfig = {
systemType: "one"
};
var testSelectors = [
{type: "foo", content: "foo"},
{type: "foo", content: "bar"}
];
Promise.all([
Schedule.sync({force: true}),
SiteConfig.sync({force: true}),
Selector.sync({force: true})
]).then(function () {
return Promise.all([
Schedule.create(testSchedule),
SiteConfig.create(testSiteConfig),
Selector.bulkCreate(testSelectors)
]);
}).spread(function (schedule, siteConfig, selectors) {
return Promise.map(selectors, function (selector) {
return selector.setSiteConfig(siteConfig);
}).then(function (array) {
return siteConfig.getSelectors();
}).each(function (selector) {
// This is where I expect "foo" and "bar" but instead get null
console.log("Selector content:", selector.get("content"));
});
});
I'd expect this code to add a SiteConfigId column to my Selectors so that my siteConfig.getSelectors() would return my testSelectors. How can I achieve this?
[UPDATE]
It turns out what I had earlier was wrong. The method setSiteConfig() is not what you want to use. I checked the db and it looks like Sequelize created two new records instead of associating the existing foo/bar selectors:
test=# select * from "Selectors";
id | type | content | createdAt | updatedAt | SiteConfigId
----+------+---------+----------------------------+----------------------------+--------------
1 | foo | foo | 2015-04-05 20:38:55.282-07 | 2015-04-05 20:38:55.282-07 |
2 | foo | bar | 2015-04-05 20:38:55.282-07 | 2015-04-05 20:38:55.282-07 |
3 | | | 2015-04-05 20:38:55.282-07 | 2015-04-05 20:38:55.311-07 | 1
4 | | | 2015-04-05 20:38:55.282-07 | 2015-04-05 20:38:55.31-07 | 1
So what is different? You can't use setSiteConfig on the child rows, instead you call addSelectors on siteConfig and pass in the selectors you want to associate. See updated code below.
Changed Promise variable to BPromise because node has a native Promise module now which would cause a conflict. Also I believe Sequelize has bluebird built-in so you can also just use Sequelize.Promise.
Removed the nested promise in your spread call because there is no need for it.
Side note: Promise.all returns a single result array so I don't think you should be using .spread().
var BPromise = require("bluebird");
var Sequelize = require("sequelize");
var sequelize = new Sequelize('test', 'root', 'password', {
host: "localhost",
dialect: "postgres",
pool: {
max: 5,
min: 0,
idle: 10000
}
});
var Schedule = sequelize.define("Schedule", {
website: {
type: Sequelize.STRING
}
});
var SiteConfig = sequelize.define("SiteConfig", {
systemType: {
type: Sequelize.STRING
}
});
var Selector = sequelize.define("Selector", {
type: {
type: Sequelize.STRING
},
content: {
type: Sequelize.STRING
}
});
Selector.belongsTo(SiteConfig);
SiteConfig.hasMany(Selector);
var testSchedule = {
website: "google.com"
};
var testSiteConfig = {
systemType: "one"
};
var testSelectors = [
{type: "foo", content: "foo"},
{type: "foo", content: "bar"}
];
sequelize.sync({ force: true })
.then(function(result) {
return BPromise.all([
Schedule.create(testSchedule),
SiteConfig.create(testSiteConfig),
Selector.bulkCreate(testSelectors, { returning: true })
]);
})
.then(function(result) {
var siteConfig = result[1];
var selectors = result[2];
return siteConfig.addSelectors(selectors);
})
.then(function (result) {
return this.siteConfig.getSelectors();
})
.each(function(result) {
console.log('boomshakalaka:', result.get());
})
.catch(function(error) {
console.log(error);
});

Categories

Resources