'List of slices created by this user'

@api
@has_access_api
@expose(u'/created_slices/<user_id>/', methods=[u'GET'])
def created_slices(self, user_id):

    Slice = models.Slice
    qry = db.session.query(Slice).filter(sqla.or_((Slice.created_by_fk == user_id), (Slice.changed_by_fk == user_id))).order_by(Slice.changed_on.desc())
    payload = [{u'id': o.id, u'title': o.slice_name, u'url': o.slice_url, u'dttm': o.changed_on} for o in qry.all()]
    return json_success(json.dumps(payload, default=utils.json_int_dttm_ser))
