There was a chance or URL overlap - removing this chance.
This commit is contained in:
parent
82bafacd72
commit
b712136a6b
|
@ -1,19 +1,23 @@
|
||||||
import { generator } from "../../shared"
|
import { generator } from "../../shared"
|
||||||
import { CreateAppRequest } from "../../types"
|
import { CreateAppRequest } from "../../types"
|
||||||
|
|
||||||
|
function uniqueWord() {
|
||||||
|
return generator.word() + generator.hash()
|
||||||
|
}
|
||||||
|
|
||||||
export const generateApp = (
|
export const generateApp = (
|
||||||
overrides: Partial<CreateAppRequest> = {}
|
overrides: Partial<CreateAppRequest> = {}
|
||||||
): CreateAppRequest => ({
|
): CreateAppRequest => ({
|
||||||
name: generator.word() + generator.hash(),
|
name: uniqueWord(),
|
||||||
url: `/${generator.word() + generator.hash()}`,
|
url: `/${uniqueWord()}`,
|
||||||
...overrides,
|
...overrides,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Applications type doesn't work here, save to add useTemplate parameter?
|
// Applications type doesn't work here, save to add useTemplate parameter?
|
||||||
export const appFromTemplate = (): CreateAppRequest => {
|
export const appFromTemplate = (): CreateAppRequest => {
|
||||||
return {
|
return {
|
||||||
name: generator.word(),
|
name: uniqueWord(),
|
||||||
url: `/${generator.word()}`,
|
url: `/${uniqueWord()}`,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
useTemplate: "true",
|
useTemplate: "true",
|
||||||
templateName: "Near Miss Register",
|
templateName: "Near Miss Register",
|
||||||
|
|
Loading…
Reference in New Issue