Fixed artists split in DB layer. Services sorted most recent first.

This commit is contained in:
Jonathan Bernard 2015-07-22 09:26:53 -05:00
parent 0e16d42eaf
commit 5e81284220
5 changed files with 25 additions and 9 deletions

View File

@ -42,9 +42,9 @@ dependencies {
war {
from "resources/webapp"
from "build/webapp"
version = project.version.releaseVersion
filter(ReplaceTokens, tokens: [version: version])
rename '(.+)(\\..*(css|js))', '$1-' + version + '$2'
version = project.version.releaseVersion
webInf { from 'resources/main/WEB-INF' }
exclude "**/.*.swp", "**/.sass-cache"
}
@ -53,9 +53,9 @@ test { testLogging { events 'failed' } }
task testWar(type: War) {
from 'resources/webapp'
version = project.version.releaseVersion
filter(ReplaceTokens, tokens: [version: version])
rename '(.+)(\\..*(css|js))', '$1-' + version + '$2'
version = project.version.releaseVersion
webInf { from 'resources/test/WEB-INF' }
classifier 'test' }

View File

@ -315,7 +315,7 @@ public class NLSongsDB {
return buildToken(row, user) }
public static List<String> unwrapArtists(String artists) {
return artists.split(';') as List<String> }
return artists.split(':') as List<String> }
public static String wrapArtists(List<String> artists) {
return artists.join(':') }

View File

@ -142,11 +142,26 @@ Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
in with the request will be ignored.
<p><h4>Reponse</h4>
The newly-created song record.
The newly-created song record. If a value is given in the
request for the <tt>id</tt> attribute it is ignored. The
attribute for new records is determined by the service and
returned as part of the response.
<p><h4>Example</h4>
<pre>
</pre></li>
POST http://newlifesongs.jdbernard.com/api/v1/songs
Content-Length: 60
Content-Type: application/json
{"id":22,"name":"This is How We Praise Him","artists":[""]}
</pre>
<p><pre>
HTTP/1.1 201 Created
Content-Length:
Content-Type: application/json
</pre></li>
<li><h3><code>GET /songs/&lt;songId&gt;</code></h3>

View File

@ -57,7 +57,8 @@ songsDB = NLSongsContext.songsDB
<script type="application/javascript">
window.onload = function() { \$("#services-table").
dataTable({ "paging": false }); };
dataTable({ "paging": false,
"order": [[0, "desc"]]}); };
</script>
</body>
</html>

View File

@ -1,6 +1,6 @@
#
#Tue May 12 20:52:22 CDT 2015
#Tue Jul 21 19:08:16 CDT 2015
major=2
version.release=false
version.release=true
minor=4
build=0
build=6