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:
parent
bf1ad30b75
commit
67608a833b
1
.github/workflows/lint-server.yml
vendored
1
.github/workflows/lint-server.yml
vendored
@ -9,6 +9,7 @@ on:
|
||||
|
||||
env:
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
USE_LOCAL_MATTERMOST-SERVER_REPO: true
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user