yeh boi
This commit is contained in:
1 parent
30bf7426e4
commit
323c7877b1
13 files changed
+94
-52
No files matched your search
+3
-6
@@ -153,12 +153,9 @@ export default function createApi(log: Log, pg: Pg, discogs, events) {
|
||||
const { releaseId } = ctx.request.body;
|
||||
const user = await pg.userFindId(ctx.state.user.id);
|
||||
const release = await discogs.release(releaseId);
|
||||
const want = await pg.wantCreate([release], user);
|
||||
|
||||
// fetch listings
|
||||
const listings = await discogs.listings(want);
|
||||
|
||||
ctx.response.body = { want, listings };
|
||||
const want = await pg.wantCreate(release, user);
|
||||
events.emit(Events.WantsAdded, [want]);
|
||||
ctx.response.body = [want];
|
||||
});
|
||||
|
||||
router.post('/want/discogs', async function wantListPost(ctx, next) {
|
||||
|
||||
Reference in new issue
Block a user