When querying a view created through sync gateway admin interface, I got this error:
{
"error": "Internal Server Error",
"reason": "Internal error: error executing view req at http://127.0.0.1:8092/$DB/_design/admin/_view/qmunecards: 404 Object Not Found - {\"error\":\"not_found\",\"reason\":\"Design document _design/admin not found\"}\ "
}
I followed Creating and querying a view and I created a view through admin interface :4985 PUT /$DB/admin HTTP/1.1
with json:
{
"views":{
"qmunecards":{
"map":"function (doc, meta) { if(doc.type === \"customer\"){ emit(doc.type, doc.test); } }"
}
}
}
With response HTTP Status Code 201 Created, and response body:
{"id": "admin","ok": true,"rev": "1-50b22d801b04fe3e48755ff1aa3b4926"}
Is there something wrong with my setup?