HM-119. Добавлена валидация key при создании хранилищ
This commit is contained in:
@ -12,7 +12,7 @@ content-type: application/json
|
|||||||
Api-Name: store-service-test
|
Api-Name: store-service-test
|
||||||
|
|
||||||
{
|
{
|
||||||
"key": "testApi-455",
|
"key": "teFDfd4_fd-g53",
|
||||||
"value": {
|
"value": {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@ -25,6 +25,8 @@ export class Store extends Document {
|
|||||||
required: true,
|
required: true,
|
||||||
unique: true,
|
unique: true,
|
||||||
type: String,
|
type: String,
|
||||||
|
minlength: 6,
|
||||||
|
validate: new RegExp(/^[a-zA-Z][a-zA-Z0-9_-]*$/)
|
||||||
})
|
})
|
||||||
key: string;
|
key: string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user