branch bow-v2-go updated (255e646 -> e00acb8)
This is an automated email from the git hooks/post-receive script. New change to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git from 255e646 modification du root de l'app js new e00acb8 correction requete de recup du user correction url back (variable) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit e00acb8c6eb8f526721fb731cf099b9d83b72e6b Author: Benjamin <poussin@codelutin.com> Date: Tue May 12 03:03:44 2020 +0200 correction requete de recup du user correction url back (variable) Summary of changes: pkg/repository/userRepository.go | 15 +++++++++------ web/src/components/Tags.vue | 2 +- web/src/main.js | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit e00acb8c6eb8f526721fb731cf099b9d83b72e6b Author: Benjamin <poussin@codelutin.com> Date: Tue May 12 03:03:44 2020 +0200 correction requete de recup du user correction url back (variable) --- pkg/repository/userRepository.go | 15 +++++++++------ web/src/components/Tags.vue | 2 +- web/src/main.js | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pkg/repository/userRepository.go b/pkg/repository/userRepository.go index 1a60c1d..cef426e 100644 --- a/pkg/repository/userRepository.go +++ b/pkg/repository/userRepository.go @@ -21,18 +21,21 @@ all field are send except: - email confirmation token */ func UserJSON(currentUser model.BowUser, id string, fields ...string) (string, error) { - var allFields string + var askedFields string if len(fields) == 0 { - allFields = "id, creationdate, updatedate, login, tokens, emails, authenticationinfo, autoscreenshot, autofavicon, maxtagincloud, maxresult, actions" + askedFields = "id, creationdate, updatedate, login, tokens, emails, unconfirmedemailsList, authenticationinfo, autoscreenshot, autofavicon, maxtagincloud, maxresult, actions" } else { - allFields = strings.Join(fields, ",") + askedFields = strings.Join(fields, ", ") } + allFields := strings.ReplaceAll(askedFields, "unconfirmedemailsList,", "") + q := &query{sql: fmt.Sprintf(` - WITH tmp AS (select %[1]s, (jsonb_array_elements(unconfirmedemails)::jsonb)->'email' as unconfirmedemailsList from bowuser where id=$1), - __all AS (select %[1]s, array_agg(unconfirmedemailsList) as unconfirmedemailsList from tmp group by %[1]s) + WITH unconfirmedemailsList as (select id as eid, jsonb_array_elements(unconfirmedemails)::jsonb->'email' as unconfirmedemailsList from bowuser u where id=$1), + tmp AS (select %[1]s, array_agg(unconfirmedemailsList) as unconfirmedemailsList from bowuser left join unconfirmedemailsList on eid=id where id=$1 GROUP BY %[1]s), + __all AS (select %[2]s from tmp) SELECT json_agg(__all.*) as j - FROM __all`, allFields)} + FROM __all`, allFields, askedFields)} result, err := q.QueryString(currentUser, id) if err != nil { return "", utils.NewHTTPError500(err, currentUser) diff --git a/web/src/components/Tags.vue b/web/src/components/Tags.vue index d16121f..2bf67d2 100644 --- a/web/src/components/Tags.vue +++ b/web/src/components/Tags.vue @@ -1,5 +1,5 @@ <template> - <div class="tags">{{ tags.join(" ") }}</div> + <div class="tags">{{ (tags || []).join(" ") }}</div> </template> <script> diff --git a/web/src/main.js b/web/src/main.js index cca9af8..631e1e9 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -12,7 +12,7 @@ Component.registerHooks([ 'beforeRouteUpdate' ]) -window.BACKEND_URL = process.env.BACKEND_URL +window.BACKEND_URL = process.env.VUE_APP_BACKEND_URL window.FRONTEND_URL = process.env.BASE_URL // register utilities function on window, Vue and Vue instance -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm