1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 06:39:43 +02:00

templates moved to new API

This commit is contained in:
Harvey Kandola 2017-08-02 11:46:45 +01:00
parent 23e111f60d
commit 5e2c96bf5b
7 changed files with 1037 additions and 647 deletions

View file

@ -157,7 +157,7 @@ func (s Scope) GetByTag(ctx domain.RequestContext, tag string) (documents []doc.
}
// Templates returns a slice containing the documents available as templates to the client's organisation, in title order.
func (s Scope) Templates() (ctx domain.RequestContext, documents []doc.Document, err error) {
func (s Scope) Templates(ctx domain.RequestContext) ( documents []doc.Document, err error) {
err = s.Runtime.Db.Select(&documents,
`SELECT id, refid, orgid, labelid, userid, job, location, title, excerpt, slug, tags, template, layout, created, revised FROM document WHERE orgid=? AND template=1 AND labelid IN
(SELECT refid from label WHERE orgid=? AND type=2 AND userid=?