예제 #1
0
        public void PostSongTags(int songId, [FromUri] string[] tag)
        {
            if (tag == null)
            {
                throw new HttpResponseException(HttpStatusCode.BadRequest);
            }

            var tags = tag.Where(t => !string.IsNullOrEmpty(t) && Tag.IsValidTagName(t)).ToArray();

            if (!tags.Any())
            {
                return;
            }

            queries.AddSongTags(songId, tags);
        }