This is a migrated thread and some comments may be shown as answers.

Crazy result from Backend Services

3 Answers 68 Views
JavaScript SDK
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Erick
Top achievements
Rank 2
Erick asked on 23 Oct 2014, 12:36 PM
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)) })












3 Answers, 1 is accepted

Sort by
0
Erick
Top achievements
Rank 2
answered on 23 Oct 2014, 12:44 PM
Same story with deleting or updating one file
0
Anton Dobrev
Telerik team
answered on 27 Oct 2014, 02:54 PM
Hello,

Unfortunately, we were unable to reproduce the issue on our side - the code is executing as expected. In order to proceed further with the resolution of the problem - could you please elaborate a little bit on the issue you are experiencing? We'll appreciate a runnable demo that illustrates the problem and any other information that will be helpful to get a fix on the issue.

I look forward to your reply.

Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Erick
Top achievements
Rank 2
answered on 08 Dec 2014, 04:41 PM
It seems be a same bug as described here:
http://www.telerik.com/forums/permissions-not-accessible

It's fixed by now.
Tags
JavaScript SDK
Asked by
Erick
Top achievements
Rank 2
Answers by
Erick
Top achievements
Rank 2
Anton Dobrev
Telerik team
Share this question
or