fix: allow user not to write .md or .markdown when creating file based on archetype #288
This commit is contained in:
1 parent
68c4072bd1
commit
390fe1d797
4 files changed
+401
-9805
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user