Skip to content
Permalink
1d5d09bae4
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
34 lines (26 sloc) 947 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using TeamDBAwesome.Models;
using TeamDBAwesome.SqlService;
using Newtonsoft.Json;
namespace TeamDBAwesome.Controllers
{
public class GetTrackController : ApiController
{
// GET: api/GetTrack
public HttpResponseMessage Get(int TrackID)
{
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK);
MySqlService sql = new MySqlService();
Track track = sql.GetTrack(TrackID);
track.url = "http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a";
string serialized = JsonConvert.SerializeObject(track);
message.Content = new StringContent(serialized);
return message;
}
}
}