changed public id format to be 128 bit length.

This commit is contained in:
didier amyot committed 2015-07-05 18:16:40 -04:00
1 parent 78d50d9a6d
commit d2cf9d7498
11 files changed
+187 -22

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/didiercrunch/doormanserver/doormen"
"github.com/didiercrunch/doormanserver/shared"
"gopkg.in/mgo.v2/bson"
"net/http"
)
@@ -30,6 +31,6 @@ func CreateDoorman(w http.ResponseWriter, request *http.Request) {
return
}
go publisher.Emit(wdef.Id, wdef)
w.Header().Set("location", "/api/doormen/"+wdef.Id.Hex())
w.Header().Set("location", "/api/doormen/"+shared.ObjectIdToPublicId(wdef.Id))
w.WriteHeader(201)
}