Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Amri 214 posts 740 karma points
    Feb 06, 2019 @ 09:21
    David Amri
    0

    Umbraco angular api

    Hi, I'm reading the documentation regarding custom dashboards in Umbraco. I wanted to play around with it to learn more but I'm kind of stuck with this example.

    My model looks like this:

    angular.module("umbraco").controller("CustomWelcomeDashboardController", function ($scope, userService, logResource) {
    
        var vm = this;
    
        vm.UserName = 'guest';
        vm.UserLogHistory = [];
    
        var userLogOptions = {
            pageSize: 10,
            pageNumber: 1,
            orderDirection: "Descending",
            sinceDate: new Date(2017, 0, 1)
        };
    
        var user = userService.getCurrentUser().then(function (user) {
            vm.UserName = user.name;
        });
    
        logResource.getPagedUserLog(userLogOptions).then(function (response) {
            console.log(response)
            //vm.UserLogHistory = response;
        });
    });
    

    But I'm not getting any data in the browser console, instead I'm getting a console error http://localhost:50358/umbraco/backoffice/UmbracoApi/Log/GetPagedEntityLog?pageSize=10&pageNumber=1&orderDirection=Descending&sinceDate=Sun+Jan+01+2017+00:00:00+GMT+0100+(centraleuropeisk+normaltid)

    Any ideas? My test looks just like the example?

    Best regards

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Feb 12, 2019 @ 09:29
    Marc Goodson
    0

    Hi David

    I think there is a bug working with SQL CE and getPagedUserLog, that was resolved in Umbraco 7.13.

    Which version of Umbraco are you running on?

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft