1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-30 17:15:36 +02:00

restructered some of the internals and added basic js app hooks support

This commit is contained in:
Gani Georgiev
2023-06-08 17:59:08 +03:00
parent ff5508cb79
commit 3cf3e04866
24 changed files with 1218 additions and 422 deletions

View File

@@ -343,7 +343,7 @@ func init() {
}
`
return fmt.Sprintf(template, filepath.Base(p.options.Dir)), nil
return fmt.Sprintf(template, filepath.Base(p.config.Dir)), nil
}
func (p *plugin) goSnapshotTemplate(collections []*models.Collection) (string, error) {
@@ -380,7 +380,7 @@ func init() {
`
return fmt.Sprintf(
template,
filepath.Base(p.options.Dir),
filepath.Base(p.config.Dir),
escapeBacktick(string(jsonData)),
), nil
}
@@ -427,7 +427,7 @@ func init() {
return fmt.Sprintf(
template,
filepath.Base(p.options.Dir),
filepath.Base(p.config.Dir),
escapeBacktick(string(jsonData)),
collection.Id,
), nil
@@ -475,7 +475,7 @@ func init() {
return fmt.Sprintf(
template,
filepath.Base(p.options.Dir),
filepath.Base(p.config.Dir),
collection.Id,
escapeBacktick(string(jsonData)),
), nil
@@ -745,7 +745,7 @@ func init() {
return fmt.Sprintf(
template,
filepath.Base(p.options.Dir),
filepath.Base(p.config.Dir),
imports,
old.Id, strings.TrimSpace(up),
new.Id, strings.TrimSpace(down),