Commit 2f5b84d5 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt

expose artist via api

parent 19e34455
......@@ -2,10 +2,10 @@ import datetime
class Track:
def __init__(self, pk, title, description, started_at):
def __init__(self, pk, artist, title, started_at):
self.id = pk
self.artist = artist
self.title = title
self.description = description
self.started_at = started_at
def __eq__(self, other):
......@@ -15,7 +15,8 @@ class Track:
return dict(
id=self.id,
title=self.title,
description=self.description,
artist=self.artist,
description=self.artist,
started_at=self.started_at.isoformat(),
finished_at=None,
cover_image=None,
......@@ -24,5 +25,5 @@ class Track:
@classmethod
def hydrate_from_db(cls, row):
pk, start, artist, title = row
return cls(pk, title, artist,
return cls(pk, artist, title,
datetime.datetime.fromtimestamp(start))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment