docs($resource): fix example using promise