// ExtractTargetID extracts ID from the URL.
ExtractTargetID extracts ID from the URL.
// ExtractTargetID extracts ID from the URL .
func ExtractTargetID(r *http.Request) (xid.ID, error) {
	strID, err := ExtractParam(r, "id")
	if err != nil {
		return xid.ID{}, NewError(nil, http.StatusBadRequest, "invalid id")
	}
	id, err := xid.FromString(strID)
	if err != nil {
		return xid.ID{}, NewError(nil, http.StatusBadRequest, "invalid id")
	}
	return id, nil
}
func ExtractTargetID ( r * http . Request ) ( xid . ID , error ) { strID , err := ExtractParam ( r , " " ) if err != nil { return xid . ID { } , NewError ( nil , http . StatusBadRequest , " " ) } id , err := xid . FromString ( strID ) if err != nil { return xid . ID { } , NewError ( nil , http . StatusBadRequest , " " ) } return id , nil }
ExtractTargetID extracts ID from the URL.
ExtractTargetID extracts ID from the URL .