// globalIdcontracts is handler for GET /companies/{globalId}/contracts
// Get the contracts where the organization is 1 of the parties. Order descending by date.
func (api CompaniesAPI) globalIdcontractsGet(w http.ResponseWriter, r *http.Request) {
	globalID := mux.Vars(r)["globalId"]
	includedparty := contractdb.Party{Type: "company", Name: globalID}
	contract.FindContracts(w, r, includedparty)
}
// GetContracts is the handler for GET /organizations/{globalid}/contracts
// Get the contracts where the organization is 1 of the parties. Order descending by
// date.
func (api OrganizationsAPI) GetContracts(w http.ResponseWriter, r *http.Request) {
	globalID := mux.Vars(r)["globalId"]
	includedparty := contractdb.Party{Type: "org", Name: globalID}
	contract.FindContracts(w, r, includedparty)
}