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:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
USE_LOCAL_MATTERMOST-SERVER_REPO: true
jobs:
golangci:

View File

@ -42,17 +42,25 @@ func main() {
}
func makeGoWork(ci bool) string {
repos := []string{
"mattermost-server",
"enterprise",
}
var b strings.Builder
b.WriteString("go 1.18\n\n")
b.WriteString("use ./mattermost-plugin\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 {
b.WriteString("use ./linux\n")
} else {
b.WriteString("use ../mattermost-server\n")
b.WriteString("use ../enterprise\n")
}
return b.String()

View File

@ -34,7 +34,7 @@ type serviceAPIAdapter struct {
func newServiceAPIAdapter(api *boardsProduct) *serviceAPIAdapter {
return &serviceAPIAdapter{
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) {
user, appErr := a.api.userService.UpdateUser(user, true)
user, appErr := a.api.userService.UpdateUser(a.ctx, user, true)
return user, normalizeAppErr(appErr)
}