Log status codes when initializing actor
This commit is contained in:
parent
c1cecd45a4
commit
8cf98afe0b
|
@ -36,14 +36,13 @@ tasks:
|
|||
# Login with cURL to create actors
|
||||
docker-compose up -d nginx
|
||||
gp ports await 8000
|
||||
sleep 10
|
||||
python .gitpod/init_actor.py
|
||||
|
||||
# Import music
|
||||
git clone https://dev.funkwhale.audio/funkwhale/catalog.git
|
||||
sudo mv catalog/music data
|
||||
sudo chown -R root:root data/music
|
||||
rm -rf catalog
|
||||
python .gitpod/init_actor.py
|
||||
LIBRARY_ID=`cat .gitpod/create_library.py | docker-compose run --rm -T api python manage.py shell -i python`
|
||||
docker-compose run --rm api python manage.py import_files $LIBRARY_ID "/music/" --recursive --noinput --in-place
|
||||
docker-compose stop
|
||||
|
|
|
@ -4,14 +4,17 @@ import requests
|
|||
req = requests.Session()
|
||||
|
||||
res = req.get('http://localhost:8000/login')
|
||||
print(res.status_code, res.cookies)
|
||||
token = res.cookies['csrftoken']
|
||||
|
||||
req.post('http://localhost:8000/api/v1/users/login', data={
|
||||
res = req.post('http://localhost:8000/api/v1/users/login', data={
|
||||
'username': 'gitpod',
|
||||
'password': 'gitpod'
|
||||
}, headers={
|
||||
'Referer': 'http://localhost:8000/login',
|
||||
'X-CSRFTOKEN': token
|
||||
})
|
||||
print(res.status_code)
|
||||
|
||||
req.get('http://localhost:8000')
|
||||
res = req.get('http://localhost:8000/api/v1/libraries/?scope=me')
|
||||
print(res.status_code)
|
Loading…
Reference in New Issue