add material setting show sample
This commit is contained in:
parent
68bf963d05
commit
5cf0a8b761
4 changed files with 107 additions and 30 deletions
|
|
@ -437,8 +437,8 @@ func (d *Data) GetMaterialSetting(countryID, filename string) []models.MaterialS
|
|||
result := make([]models.MaterialSetting, 0)
|
||||
|
||||
if countryID == "" {
|
||||
copy(result, d.currentRecipe[countryID].MaterialSetting)
|
||||
return result
|
||||
// copy(result, d.currentRecipe[countryID].MaterialSetting)
|
||||
return d.currentRecipe[countryID].MaterialSetting
|
||||
}
|
||||
|
||||
if !strings.Contains(filename, "tmp") {
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ func (s *Server) createHandler() {
|
|||
_ = userService.CreateNewUser(context.WithValue(context.Background(), "user", &models.User{Email: "system"}), "phu", "pakin.t@forth.co.th", "", permissions.SuperAdmin)
|
||||
_ = userService.CreateNewUser(context.WithValue(context.Background(), "user", &models.User{Email: "system"}), "wanlop", "wanlop.r@forth.co.th", "", permissions.SuperAdmin)
|
||||
_ = userService.CreateNewUser(context.WithValue(context.Background(), "user", &models.User{Email: "system"}), "dawit", "dawit.o@forth.co.th", "", permissions.SuperAdmin)
|
||||
_ = userService.CreateNewUser(context.WithValue(context.Background(), "user", &models.User{Email: "system"}), "narisara", "narisara.k@tao-bin.com", "", permissions.SuperAdmin)
|
||||
|
||||
// Auth Router
|
||||
r.Group(func(r chi.Router) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue