func NewProject(request *http.Request) (Project, error) {
	var project Project
	defer request.Body.Close()

	body, err := ioutil.ReadAll(request.Body)

	if err == nil {
		if err = json.Unmarshal(body, &project); err != nil {
			return project, err
		}
	}

	// Set created and touched time to now
	project.Tasks = []Task{}
	project.Developers = []Developer{}
	project.Created = time.Now().UTC().Format(time.RFC3339)
	project.Touched = project.Created
	project.Key = requestVarInt64(request, ProjectResourceID)
	return project, err
}
// NewProject Created from an HTTP request
NewProject Created from an HTTP request
// NewProject Created from an HTTP request
func NewProject(request *http.Request) (Project, error) {
	var project Project
	defer request.Body.Close()
	body, err := ioutil.ReadAll(request.Body)
	if err == nil {
		if err = json.Unmarshal(body, &project); err != nil {
			return project, err
		}
	}
	project.Tasks = []Task{}
	project.Developers = []Developer{}
	project.Created = time.Now().UTC().Format(time.RFC3339)
	project.Touched = project.Created
	project.Key = requestVarInt64(request, ProjectResourceID)
	return project, err
}
func NewProject ( request * http . Request ) ( Project , error ) { var project Project defer request . Body . Close ( ) body , err := ioutil . ReadAll ( request . Body ) if err == nil { if err = json . Unmarshal ( body , & project ) ; err != nil { return project , err } } project . Tasks = [ ] Task { } project . Developers = [ ] Developer { } project . Created = time . Now ( ) . UTC ( ) . Format ( time . RFC3339 ) project . Touched = project . Created project . Key = requestVarInt64 ( request , ProjectResourceID ) return project , err }
NewProject Created from an HTTP request
NewProject Created from an HTTP request
// Set created and touched time to now