Review Request 112478: map the assets with the discourse categories
Aaron J. Seigo
aseigo at kde.org
Tue Sep 3 10:21:22 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112478/#review39248
-----------------------------------------------------------
that we are using discourse is an implementation detail. it should not bleed out into the API, including in the returned json. instead of calling the key "discourseLink" just call it "forum"
server/config.json.sample
<http://git.reviewboard.kde.org/r/112478/#comment28947>
domain is not obvious since there is also host. perhaps call this externalUrl?
that way there is discourse.host and discourse.externalUrl
server/lib/db/assetinfo.js
<http://git.reviewboard.kde.org/r/112478/#comment28946>
setting it to {} will change the value from a string, so if the database query returned nothing .. then the URL in the returned json will not be a string.
this should be:
assetInfo.json.asset.discourseLink = '';
sql/discourse.plsql
<http://git.reviewboard.kde.org/r/112478/#comment28948>
this is unecessary; the "on delete cascade" on the assetId column provides this behavior for free.
- Aaron J. Seigo
On Sept. 3, 2013, 10:09 a.m., Giorgos Tsiapaliokas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112478/
> -----------------------------------------------------------
>
> (Updated Sept. 3, 2013, 10:09 a.m.)
>
>
> Review request for Bodega.
>
>
> Description
> -------
>
> Hello,
>
> this patch maps the assets with the links from the discourse categories.
> The json from asset/:assetId will contain a property named "discourseLink" with the
> appropriate link
>
>
> Diffs
> -----
>
> server/config.json.sample 1b5ea7f
> server/lib/db/assetinfo.js b52af3b
> sql/discourse.plsql 7d108a4
>
> Diff: http://git.reviewboard.kde.org/r/112478/diff/
>
>
> Testing
> -------
>
> the output from asset/8
>
> {
> "authStatus": true,
> "device": "KDE-1",
> "store": "KDE-1",
> "points": 9925,
> "success": true,
> "asset": {
> "id": 8,
> "license": "GPL",
> "partnerId": 1002,
> "version": "0.1",
> "created": "2013-09-02T17:50:10.386Z",
> "filename": "org.kde.poker1.plasmoid",
> "image": "poker1.png",
> "name": "Poker1",
> "description": "Poker 1",
> "points": 15,
> "canDownload": true,
> "tags": [
> {
> "grouping": "name_p"
> },
> {
> "mimetype": "application/x-plasma"
> },
> {
> "contentrating": "Early Childhood"
> },
> {
> "assetType": "game"
> },
> {
> "category": "Card Game"
> }
> ],
> "discourseLink": "localhost:3000/category/Forum%20for%20Poker1"
> }
> }
>
>
> Thanks,
>
> Giorgos Tsiapaliokas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/active/attachments/20130903/4b39795e/attachment-0001.html>
More information about the Active
mailing list