This question is locked. New answers and comments are not allowed.
We're using Javascript SDK to retrieve data from our Backend Services database. But it's returning crazy results when authenticate an user or not. The Files is public for everyone (will be changed to shared soon). I will descibe the issue below.
At first, initialize the everlive object:
var everlive = new Everlive({ apiKey: 'KEY' });
At second, authenticate user:
everlive.Users.login('USER', 'PASSWORD', function (data) {
everlive.Files.get()
.then(function (data) {
alert(data.result.length) // RETURNS 0 RECORDS
},
function (error) {
alert(JSON.stringify(error));
});
}, function (error) {
location.href = "login.aspx"
});
If i remove the authentication, then the everlive will return 69 records from Files.
everlive.Files.get()
.then(function (data) {
alert(data.result.length) // RETURNS 69 RECORDS
},
function (error) {
alert(JSON.stringify(error));
});
After authenticate the user, the code below will return Item not found with code 801 but the file exists...
Works fine when not authenticate the user.
everlive.Files.getById("FILE").then(function (data) {
alert(JSON.stringify(error))
}, function (error) { alert(JSON.stringify(error)) })
At first, initialize the everlive object:
var everlive = new Everlive({ apiKey: 'KEY' });
At second, authenticate user:
everlive.Users.login('USER', 'PASSWORD', function (data) {
everlive.Files.get()
.then(function (data) {
alert(data.result.length) // RETURNS 0 RECORDS
},
function (error) {
alert(JSON.stringify(error));
});
}, function (error) {
location.href = "login.aspx"
});
If i remove the authentication, then the everlive will return 69 records from Files.
everlive.Files.get()
.then(function (data) {
alert(data.result.length) // RETURNS 69 RECORDS
},
function (error) {
alert(JSON.stringify(error));
});
After authenticate the user, the code below will return Item not found with code 801 but the file exists...
Works fine when not authenticate the user.
everlive.Files.getById("FILE").then(function (data) {
alert(JSON.stringify(error))
}, function (error) { alert(JSON.stringify(error)) })