ReadJsonDocumentFromBody 추가
This commit is contained in:
@ -429,6 +429,12 @@ func ReadStringFormValue(r url.Values, key string) (string, bool) {
|
|||||||
return strval, len(strval) > 0
|
return strval, len(strval) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ReadJsonDocumentFromBody(r io.Reader) (out map[string]any) {
|
||||||
|
dec := json.NewDecoder(r)
|
||||||
|
dec.Decode(&out)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func DotStringToTimestamp(tv string) primitive.Timestamp {
|
func DotStringToTimestamp(tv string) primitive.Timestamp {
|
||||||
if len(tv) == 0 {
|
if len(tv) == 0 {
|
||||||
return primitive.Timestamp{T: 0, I: 0}
|
return primitive.Timestamp{T: 0, I: 0}
|
||||||
|
|||||||
Reference in New Issue
Block a user