Hi guys
Please check in this provider I am calling insert function and in console I am able to check inserted message but not after in message i.e.after execute insert function…
export class UserProvider {
private db: SQLite;
private db1: SQLiteObject;
public constructor() {
this.db=new SQLite();
this.db.create({
name: 'data.db',
location: 'default'
}).then((db1: SQLiteObject) => {
db1.executeSql('create table if not exists user (name VARCHAR(32),email VARCHAR(32),number VARCHAR(32),password VARCHAR(32))', {})
.then((data) => {
console.log("created")
}).catch(e => console.log(JSON.stringify(e)));
})
}
public insert(name:string, email:string, number:string, password:string) {
console.log("inserted");
this.db1.executeSql('insert into user(name ,email,number,password) values ("' + name + '","' + email + '","' + number + '","' +password + '")', {});
console.log("in");
}
I’m sorry, but that is a garbage excuse. There is absolutely no justification for doing something as negligent as storing cleartext passwords “for testing only”. You have to build security into your application from the beginning. Bolting it on later is asking for trouble. You must also realize that you are posting code on a public forum that other people may emulate. It is your responsibility to refrain from perpetuating such terrible code.
It’s on u what u think but I am a php developer and have made secure projects also so I don’t have to explain u what I am going to do hope u have heard about cypher and all that to decrypt passwords see I am new in Ionic so I am just going step by step so how to decrypt in Ionic that also have to search first so thanks hope u will help me in future also if stuck somewhere
If you are saying “I want to immediately return the result of an asynchronous call”, you can’t. That’s the entire point of asynchronous programming. The best you can do is to return the future to the calling function, and it is their responsibility to deal with it when it resolves.