@next-k8s/tickets 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.12](https://github.com/mathiscode/next-k8s-boilerplate/compare/@next-k8s/tickets@1.0.11...@next-k8s/tickets@1.0.12) (2022-07-07)
7
+
8
+ **Note:** Version bump only for package @next-k8s/tickets
9
+
10
+
11
+
12
+
13
+
6
14
  ## [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
15
 
8
16
  **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.11",
3
+ "version": "1.0.12",
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.25",
28
+ "@next-k8s/common": "^0.1.26",
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": "7fc87749fce185fdbc25c93c64eb8439af70910f"
54
+ "gitHead": "723a48d60edc341599979e6b0151df8bb3f45fc6"
55
55
  }
@@ -3,7 +3,7 @@ import mongoose, { ObjectId } from 'mongoose'
3
3
  interface TicketAttributes {
4
4
  title: String;
5
5
  price: Number;
6
- owner: ObjectId;
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: String,
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, getTokenCookie } from '../../test/utils'
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 () => {