Ejemplo n.º 1
0
def recieve_data():
    data = request.json
    insert_raw_deployment(db.Session(),
                          data['author'],
                          data['name'],
                          data['tags'].split(','),
                          datetime.now())
    return 'True'
Ejemplo n.º 2
0
def recieve_data():
    data = request.json
    insert_raw_deployment(db.Session(),
                          data['author'],
                          data['name'],
                          data['tags'].split(','),
                          datetime.now())
    return 'True'
Ejemplo n.º 3
0
def add_dummy():
    """
    Add a dummy module download every time this is hit
    """

    insert_raw_deployment(db.Session(), 'nibz', 'puppetboard',
                          ['awesome', 'ci', 'production'],
                          datetime.datetime.utcnow())
    return 'True'
Ejemplo n.º 4
0
def add_dummy():
    """
    Add a dummy module download every time this is hit
    """

    insert_raw_deployment(db.Session(),
                          'nibz',
                          'puppetboard',
                          ['awesome', 'ci', 'production'],
                          datetime.datetime.utcnow())
    return 'True'
Ejemplo n.º 5
0
def recieve_data():
    data = request.json
    try:
        author = data['author']
        module = data['name']
    except (KeyError, TypeError):
        abort(400)

    try:
        tags = data['tags']
    except KeyError:
        tags = []
    else:
        tags = tags.split(',')
    insert_raw_deployment(db.Session(), author, module, tags,
                          datetime.datetime.utcnow())
    return 'True'
Ejemplo n.º 6
0
def recieve_data():
    data = request.json
    try:
        author = data['author']
        module = data['name']
    except (KeyError, TypeError):
        abort(400)

    try:
        tags = data['tags']
    except KeyError:
        tags = []
    else:
        tags = tags.split(',')
    insert_raw_deployment(db.Session(),
                          author,
                          module,
                          tags,
                          datetime.datetime.utcnow())
    return 'True'