@next-k8s/tickets 1.0.11 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +24 -0
- package/package.json +3 -3
- package/src/models/ticket.ts +2 -2
- package/src/routes/__test__/create.test.ts +2 -9
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,30 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [1.0.14](https://github.com/mathiscode/next-k8s-boilerplate/compare/@next-k8s/tickets@1.0.13...@next-k8s/tickets@1.0.14) (2022-07-07)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @next-k8s/tickets
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [1.0.13](https://github.com/mathiscode/next-k8s-boilerplate/compare/@next-k8s/tickets@1.0.12...@next-k8s/tickets@1.0.13) (2022-07-07)
|
15
|
+
|
16
|
+
**Note:** Version bump only for package @next-k8s/tickets
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
## [1.0.12](https://github.com/mathiscode/next-k8s-boilerplate/compare/@next-k8s/tickets@1.0.11...@next-k8s/tickets@1.0.12) (2022-07-07)
|
23
|
+
|
24
|
+
**Note:** Version bump only for package @next-k8s/tickets
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
6
30
|
## [1.0.11](https://github.com/mathiscode/next-k8s-boilerplate/compare/@next-k8s/tickets@1.0.10...@next-k8s/tickets@1.0.11) (2022-07-06)
|
7
31
|
|
8
32
|
**Note:** Version bump only for package @next-k8s/tickets
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@next-k8s/tickets",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.14",
|
4
4
|
"main": "index.js",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -25,7 +25,7 @@
|
|
25
25
|
]
|
26
26
|
},
|
27
27
|
"dependencies": {
|
28
|
-
"@next-k8s/common": "^0.1.
|
28
|
+
"@next-k8s/common": "^0.1.28",
|
29
29
|
"@types/cookie-session": "^2.0.44",
|
30
30
|
"@types/express": "^4.17.13",
|
31
31
|
"@types/jsonwebtoken": "^8.5.8",
|
@@ -51,5 +51,5 @@
|
|
51
51
|
"supertest": "^6.2.3",
|
52
52
|
"ts-jest": "^28.0.4"
|
53
53
|
},
|
54
|
-
"gitHead": "
|
54
|
+
"gitHead": "c632d1f1265d73b618903052426fee9dbb0db02d"
|
55
55
|
}
|
package/src/models/ticket.ts
CHANGED
@@ -3,7 +3,7 @@ import mongoose, { ObjectId } from 'mongoose'
|
|
3
3
|
interface TicketAttributes {
|
4
4
|
title: String;
|
5
5
|
price: Number;
|
6
|
-
owner:
|
6
|
+
owner: string;
|
7
7
|
createdAt?: Date;
|
8
8
|
updatedAt?: Date;
|
9
9
|
}
|
@@ -20,7 +20,7 @@ const ticketSchema = new mongoose.Schema({
|
|
20
20
|
},
|
21
21
|
|
22
22
|
owner: {
|
23
|
-
type:
|
23
|
+
type: mongoose.Schema.Types.ObjectId,
|
24
24
|
required: true
|
25
25
|
}
|
26
26
|
}, {
|
@@ -1,16 +1,9 @@
|
|
1
1
|
import request from 'supertest'
|
2
|
+
import { getTokenCookie } from '@next-k8s/common'
|
2
3
|
import app from '../../app'
|
3
4
|
import Ticket from '../../models/ticket'
|
4
5
|
import natsClient from '../../nats-client'
|
5
|
-
import { createTicket
|
6
|
-
|
7
|
-
// const createTicket = (cookie?: string, title = 'Test Event', price = 20000, expectedStatusCode = 201) => {
|
8
|
-
// return request(app)
|
9
|
-
// .post('/api/tickets')
|
10
|
-
// .set('Cookie', cookie ? [cookie] : [])
|
11
|
-
// .send({ title, price })
|
12
|
-
// .expect(expectedStatusCode)
|
13
|
-
// }
|
6
|
+
import { createTicket } from '../../test/utils'
|
14
7
|
|
15
8
|
describe('[Create New Ticket] Route: /api/tickets', () => {
|
16
9
|
it('should be a valid route', async () => {
|