fix: allow user not to write .md or .markdown when creating file based on archetype #288
parent
68c4072bd1
commit
390fe1d797
|
@ -8,3 +8,5 @@ yarn-debug.log*
|
|||
yarn-error.log*
|
||||
.idea
|
||||
.vscode
|
||||
package-lock.json
|
||||
yarn.lock
|
|
@ -48,6 +48,10 @@ export default {
|
|||
new (url, type) {
|
||||
url = removePrefix(url)
|
||||
|
||||
if (!url.endsWith('.md') && !url.endsWith('.markdown')) {
|
||||
url += '.markdown'
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let request = new window.XMLHttpRequest()
|
||||
request.open('POST', `${this.$store.state.baseURL}/api/resource${url}`, true)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
790
rice-box.go
790
rice-box.go
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue