@ -30,7 +30,7 @@ func NewResource(list, create Func, get, update, delete IDFunc) *Resource {
func (resource *Resource) Handle(path string, w http.ResponseWriter, req *http.Request, user *auth.User) bool {
// Get the subpath out of the path
subpath := req.URL.Path[len(path):]
if subpath[0] == '/' {
if len(subpath) > 0 && subpath[0] == '/' {
subpath = subpath[1:]
}