Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac24680bd4 | |||
| d381058591 |
13
CHANGELOG.md
13
CHANGELOG.md
@ -1,6 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
## v0.0.6
|
||||||
|
|
||||||
|
[compare changes](https://github.com/arashsheyda/nuxt-mongoose/compare/v0.0.5...v0.0.6)
|
||||||
|
|
||||||
|
|
||||||
|
### 🩹 Fixes
|
||||||
|
|
||||||
|
- Remove useMongoose composable ([d381058](https://github.com/arashsheyda/nuxt-mongoose/commit/d381058))
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
- Arashsheyda <sheidaeearash1999@gmail.com>
|
||||||
|
|
||||||
## v0.0.5
|
## v0.0.5
|
||||||
|
|
||||||
[compare changes](https://github.com/arashsheyda/nuxt-mongoose/compare/v0.0.4...v0.0.5)
|
[compare changes](https://github.com/arashsheyda/nuxt-mongoose/compare/v0.0.4...v0.0.5)
|
||||||
|
|||||||
11
README.md
11
README.md
@ -83,17 +83,6 @@ export const User = defineMongooseModel({
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
### useMongoose
|
|
||||||
|
|
||||||
This composable returns the Mongoose DB instance. Example usage:
|
|
||||||
|
|
||||||
```vue
|
|
||||||
<script lang="ts" setup>
|
|
||||||
const mongoose = useMongoose()
|
|
||||||
const user = await mongoose.db.collection('users').findOne()
|
|
||||||
</script>
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT License](./LICENSE)
|
[MIT License](./LICENSE)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nuxt-mongoose",
|
"name": "nuxt-mongoose",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.5",
|
"version": "0.0.6",
|
||||||
"description": "Nuxt 3 module for MongoDB with Mongoose",
|
"description": "Nuxt 3 module for MongoDB with Mongoose",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
import type { mongo } from 'mongoose'
|
|
||||||
import { connection } from 'mongoose'
|
|
||||||
|
|
||||||
export function useMongoose(): { db: mongo.Db } {
|
|
||||||
return {
|
|
||||||
db: connection?.db,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user