1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-02-01 19:14:35 +02:00

Update product adapter for changes in the UserService (#3401)

* reflect changes in server regarding to user service

* include server into build even in CI

* Fix lint pipeline to use only local repositories

Signed-off-by: Mustafa Kara <mustafa.kara@mattermost.com>

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Mustafa Kara <mustafa.kara@mattermost.com>
This commit is contained in:
Ibrahim Serdar Acikgoz 2022-07-28 07:33:55 +03:00 committed by GitHub
parent bf1ad30b75
commit 67608a833b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View File

@ -9,6 +9,7 @@ on:
env: env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
USE_LOCAL_MATTERMOST-SERVER_REPO: true
jobs: jobs:
golangci: golangci:

View File

@ -42,17 +42,25 @@ func main() {
} }
func makeGoWork(ci bool) string { func makeGoWork(ci bool) string {
repos := []string{
"mattermost-server",
"enterprise",
}
var b strings.Builder var b strings.Builder
b.WriteString("go 1.18\n\n") b.WriteString("go 1.18\n\n")
b.WriteString("use ./mattermost-plugin\n") b.WriteString("use ./mattermost-plugin\n")
b.WriteString("use ./server\n") b.WriteString("use ./server\n")
for repoIdx := range repos {
if isEnvVarTrue(fmt.Sprintf("USE_LOCAL_%s_REPO", strings.ToUpper(repos[repoIdx])), true) {
b.WriteString(fmt.Sprintf("use ../%s\n", repos[repoIdx]))
}
}
if ci { if ci {
b.WriteString("use ./linux\n") b.WriteString("use ./linux\n")
} else {
b.WriteString("use ../mattermost-server\n")
b.WriteString("use ../enterprise\n")
} }
return b.String() return b.String()

View File

@ -34,7 +34,7 @@ type serviceAPIAdapter struct {
func newServiceAPIAdapter(api *boardsProduct) *serviceAPIAdapter { func newServiceAPIAdapter(api *boardsProduct) *serviceAPIAdapter {
return &serviceAPIAdapter{ return &serviceAPIAdapter{
api: api, api: api,
ctx: &request.Context{}, ctx: request.EmptyContext(api.logger),
} }
} }
@ -94,7 +94,7 @@ func (a *serviceAPIAdapter) GetUserByEmail(email string) (*mm_model.User, error)
} }
func (a *serviceAPIAdapter) UpdateUser(user *mm_model.User) (*mm_model.User, error) { func (a *serviceAPIAdapter) UpdateUser(user *mm_model.User) (*mm_model.User, error) {
user, appErr := a.api.userService.UpdateUser(user, true) user, appErr := a.api.userService.UpdateUser(a.ctx, user, true)
return user, normalizeAppErr(appErr) return user, normalizeAppErr(appErr)
} }