-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
132 changed files
with
2,128 additions
and
1,276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,7 @@ name: DeployFrontendDev | |
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
|
||
jobs: | ||
deploy-frontend-dev: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package jobs | ||
|
||
import ( | ||
"net/http" | ||
|
||
log "github.com/sirupsen/logrus" | ||
|
||
"github.com/gin-gonic/gin" | ||
"github.com/jmoiron/sqlx" | ||
) | ||
|
||
type LifePerksImages struct { | ||
Id int `json:"id"` | ||
ImageUrls string `json:"image_urls"` | ||
Index int `json:"index"` | ||
} | ||
|
||
type LifeandPerksRepository struct { | ||
Db *sqlx.DB | ||
} | ||
|
||
func NewLifePerksImages(db *sqlx.DB) *LifeandPerksRepository { | ||
return &LifeandPerksRepository{Db: db} | ||
} | ||
|
||
func (repository *LifeandPerksRepository) LifeImages(c *gin.Context) { | ||
lifeImages := []LifePerksImages{} | ||
err := repository.Db.Select(&lifeImages, "SELECT l.id, l.image_urls, l.index FROM lifeatcanopas l") | ||
if err != nil { | ||
log.Error(err) | ||
c.AbortWithStatus(http.StatusInternalServerError) | ||
return | ||
} | ||
c.JSON(http.StatusOK, lifeImages) | ||
} | ||
|
||
func (repository *LifeandPerksRepository) PerksImages(c *gin.Context) { | ||
perksImages := []LifePerksImages{} | ||
err := repository.Db.Select(&perksImages, "SELECT p.id, p.image_urls, p.index FROM perks p") | ||
if err != nil { | ||
log.Error(err) | ||
c.AbortWithStatus(http.StatusInternalServerError) | ||
return | ||
} | ||
c.JSON(http.StatusOK, perksImages) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package jobs | ||
|
||
import ( | ||
"net/http" | ||
"net/http/httptest" | ||
"testing" | ||
"utils" | ||
|
||
"github.com/gin-gonic/gin" | ||
"github.com/jmoiron/sqlx" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
var l_repo *LifeandPerksRepository | ||
var l_err error | ||
var l_testDB *sqlx.DB | ||
|
||
func TestInitLifePerksImages(t *testing.T) { | ||
l_testDB, l_err = utils.TestDB() | ||
if l_err != nil { | ||
t.Errorf("Error in initializing test DB: %v", l_err) | ||
} | ||
|
||
l_repo = NewLifePerksImages(l_testDB) | ||
} | ||
|
||
func TestGetAllLifeImages(t *testing.T) { | ||
utils.TruncateTables(l_testDB) | ||
l_err = utils.CreateTables(l_testDB) | ||
if l_err != nil { | ||
t.Errorf("Error in initializing test DB: %v", l_err) | ||
} | ||
utils.PrepareTablesData(l_testDB) | ||
engine := gin.New() | ||
engine.GET("/api/lifeimages", l_repo.LifeImages) | ||
req, l_err := http.NewRequest("GET", "/api/lifeimages", nil) | ||
if l_err != nil { | ||
t.Errorf("Error in creating request: %v", l_err) | ||
} | ||
w := httptest.NewRecorder() | ||
engine.ServeHTTP(w, req) | ||
|
||
assert.EqualValues(t, http.StatusOK, w.Code) | ||
got := utils.GotArrayData(w, t) | ||
expected := []interface{}{expectedLifeImages()} | ||
assert.Equal(t, expected, got) | ||
} | ||
|
||
func TestGetAllPerksImages(t *testing.T) { | ||
utils.TruncateTables(l_testDB) | ||
l_err = utils.CreateTables(l_testDB) | ||
if l_err != nil { | ||
t.Errorf("Error in initializing test DB: %v", l_err) | ||
} | ||
utils.PrepareTablesData(l_testDB) | ||
engine := gin.New() | ||
engine.GET("/api/perkimages", l_repo.PerksImages) | ||
req, l_err := http.NewRequest("GET", "/api/perkimages", nil) | ||
if l_err != nil { | ||
t.Errorf("Error in creating request: %v", l_err) | ||
} | ||
w := httptest.NewRecorder() | ||
engine.ServeHTTP(w, req) | ||
|
||
assert.EqualValues(t, http.StatusOK, w.Code) | ||
got := utils.GotArrayData(w, t) | ||
expected := []interface{}{expectedPerkImages()} | ||
assert.Equal(t, expected, got) | ||
} | ||
func expectedLifeImages() map[string]interface{} { | ||
lifeImages := make(map[string]interface{}) | ||
lifeImages["id"] = 1.0 | ||
lifeImages["image_urls"] = "https://canopas-website.s3.ap-south-1.amazonaws.com/lifeCanopas/1-400.webp,https://canopas-website.s3.ap-south-1.amazonaws.com/lifeCanopas/1-800.webp,https://canopas-website.s3.ap-south-1.amazonaws.com/lifeCanopas/1-1600.webp" | ||
lifeImages["index"] = 0.0 | ||
return lifeImages | ||
} | ||
func expectedPerkImages() map[string]interface{} { | ||
perkImages := make(map[string]interface{}) | ||
perkImages["id"] = 1.0 | ||
perkImages["image_urls"] = "https://canopas-website.s3.ap-south-1.amazonaws.com/lifeCanopas/1-400.webp,https://canopas-website.s3.ap-south-1.amazonaws.com/lifeCanopas/1-800.webp" | ||
perkImages["index"] = 0.0 | ||
return perkImages | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+14.8 KB
nuxt-frontend/assets/images/flutter-app-development/blog/desk800w.webp
Binary file not shown.
Binary file added
BIN
+32.5 KB
nuxt-frontend/assets/images/flutter-app-development/cta/background-1200w.webp
Binary file not shown.
Binary file added
BIN
+81.3 KB
nuxt-frontend/assets/images/flutter-app-development/cta/background-2400w.webp
Binary file not shown.
Binary file added
BIN
+6.43 KB
nuxt-frontend/assets/images/flutter-app-development/cta/background-400w.webp
Binary file not shown.
Binary file added
BIN
+16 KB
nuxt-frontend/assets/images/flutter-app-development/cta/background-800w.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-33.4 KB
(79%)
nuxt-frontend/assets/images/ios-app-development/casestudy/justly1-800w.webp
Binary file not shown.
Binary file modified
BIN
-14.4 KB
(55%)
nuxt-frontend/assets/images/ios-app-development/casestudy/mobile/justly1.webp
Binary file not shown.
Binary file modified
BIN
-17.3 KB
(53%)
nuxt-frontend/assets/images/ios-app-development/casestudy/mobile/justly2.webp
Binary file not shown.
Binary file modified
BIN
-304 Bytes
(87%)
nuxt-frontend/assets/images/ios-app-development/development/activeconsultation.webp
Binary file not shown.
Binary file modified
BIN
+596 Bytes
(120%)
nuxt-frontend/assets/images/ios-app-development/development/activedeployment.webp
Binary file not shown.
Binary file modified
BIN
+962 Bytes
(160%)
nuxt-frontend/assets/images/ios-app-development/development/activedesign.webp
Binary file not shown.
Binary file modified
BIN
-124 Bytes
(94%)
nuxt-frontend/assets/images/ios-app-development/development/activedevelopment.webp
Binary file not shown.
Binary file modified
BIN
+138 Bytes
(100%)
nuxt-frontend/assets/images/ios-app-development/development/activemaintenance.webp
Binary file not shown.
Binary file modified
BIN
+80 Bytes
(110%)
nuxt-frontend/assets/images/ios-app-development/development/consultation.webp
Binary file not shown.
Binary file modified
BIN
+352 Bytes
(130%)
nuxt-frontend/assets/images/ios-app-development/development/deployment.webp
Binary file not shown.
Binary file modified
BIN
+472 Bytes
(150%)
nuxt-frontend/assets/images/ios-app-development/development/design.webp
Binary file not shown.
Binary file modified
BIN
+46 Bytes
(100%)
nuxt-frontend/assets/images/ios-app-development/development/development.webp
Binary file not shown.
Binary file modified
BIN
-54 Bytes
(97%)
nuxt-frontend/assets/images/ios-app-development/development/maintenance.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.