Skip to content

Commit

Permalink
crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeemzo committed Aug 13, 2019
1 parent 2db0a16 commit 4b351dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/businessFacades/transactionHandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func LastVote(w http.ResponseWriter, r *http.Request) {
object := dao.Connection{}
p := object.GetLastVoteByContribution(vars["ContibutionID"])
p.Then(func(data interface{}) interface{} {
result := data.(model.KnowledgeAPI)
result := data.(model.VoteAPI)

w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(model.LastTxnAPI{LastTxn:result.TxnHash})
Expand Down
4 changes: 2 additions & 2 deletions dao/retrieve.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func (cd *Connection) GetLastKnowledgeByPublicKey(publickey string) *promise.Pro
@author - Azeem Ashraf
*/
func (cd *Connection) GetLastContributionByKnowledge(Knowledge string) *promise.Promise {
result := []model.KnowledgeAPI{}
result := []model.ContributionAPI{}
// p := promise.NewPromise()

var p = promise.New(func(resolve func(interface{}), reject func(error)) {
Expand Down Expand Up @@ -349,7 +349,7 @@ func (cd *Connection) GetLastContributionByKnowledge(Knowledge string) *promise.
@author - Azeem Ashraf
*/
func (cd *Connection) GetLastVoteByContribution(Contribution string) *promise.Promise {
result := []model.KnowledgeAPI{}
result := []model.VoteAPI{}
// p := promise.NewPromise()

var p = promise.New(func(resolve func(interface{}), reject func(error)) {
Expand Down

0 comments on commit 4b351dd

Please sign in to comment.