2 Commits

Author SHA1 Message Date
  JaseG256 c12c32699b Before merge 6 years ago
  JaseG256 f330628bee Cleaned up SecurityConfig 6 years ago

BIN
.DS_Store View File


+ 1
- 1
ZipTeamOrange-ionic-UI/.sourcemaps/main.js.map
File diff suppressed because it is too large
View File


+ 1
- 2
ZipTeamOrange-ionic-UI/www/build/main.js View File

@@ -123,10 +123,9 @@ var FirstPage = /** @class */ (function () {
123 123
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
124 124
             selector: 'page-first',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/'<!--\n  Generated template for the FirstPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n  <ion-navbar color="primary">\n    <button menuToggle ion- button icon-only>\n      <ion-icon name ="menu"></ion-icon>\n    </button>\n    <ion-title text-center>ZipTeamOrange</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <h4>Welcome to this page</h4>\n  <div class="login-box">\n    <form #registerForm="ngForm" ng-submit="loginButton(registerForm.value)" >\n      <ion-row>\n        <ion-col>\n          <ion-list inset>\n            <ion-item>\n              <ion-input type="text" placeholder="Username" name="userName" required [(ngModel)]="Username" ></ion-input>\n            </ion-item>\n            <ion-item>\n              <ion-input type="password" placeholder="Password" name="password" required [(ngModel)]="password"></ion-input>\n            </ion-item>\n          </ion-list>\n        </ion-col>\n      </ion-row>\n      <ion-row>\n        <ion-col class="signup-col">\n          <button ion-button class="submit-btn" full type="submit" [disabled]="!registerForm.form.valid" (click)="loginButton(registerForm.value)">Login</button>\n        </ion-col>\n      </ion-row>\n    </form>\n    <ion-row>\n      <ion-col color="secondary">\n        <button ion-button class="register-btn" block clear (click)="createAccount()">Create Account</button>\n      </ion-col>\n    </ion-row>\n  </div>\n  \n</ion-content>'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/,
125 125
         }),
126
-        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]) === "function" && _a || Object, typeof (_b = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]) === "function" && _b || Object, typeof (_c = typeof __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */]) === "function" && _c || Object])
126
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */], __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */]])
127 127
     ], FirstPage);
128 128
     return FirstPage;
129
-    var _a, _b, _c;
130 129
 }());
131 130
 
132 131
 //# sourceMappingURL=first.js.map

+ 1
- 1
ZipTeamOrange-ionic-UI/www/build/main.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
ZipTeamOrange-ionic-UI/www/build/vendor.js.map
File diff suppressed because it is too large
View File


BIN
ZipTeamOrange-server/src/main/java/ZipTeamOrange/.DS_Store View File


+ 1
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Config/SecurityConfig.java View File

@@ -27,6 +27,7 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
27 27
         prePostEnabled = true
28 28
 )
29 29
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
30
+
30 31
     @Autowired
31 32
     CustomUserDetailsService customUserDetailsService;
32 33
 

+ 1
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Controller/UserController.java View File

@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.*;
10 10
 import java.util.Optional;
11 11
 
12 12
 @RestController
13
+@CrossOrigin("http://localhost:8100")
13 14
 @RequestMapping(path = "/user")
14 15
 public class UserController {
15 16
 

+ 5
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Model/Message.java View File

@@ -72,4 +72,9 @@ public class Message extends UserDateAudit {
72 72
     public void setChat(Chat chat) {
73 73
         this.chat = chat;
74 74
     }
75
+
76
+    @Override
77
+    public String toString() {
78
+        return createdDate + " " + createdBy + " " + text;
79
+    }
75 80
 }

+ 1
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Repository/UserRepository.java View File

@@ -10,6 +10,7 @@ import java.util.Optional;
10 10
 
11 11
 @Repository
12 12
 public interface UserRepository extends JpaRepository<User, Long> {
13
+
13 14
     Optional<User> findByEmail(String email);
14 15
 
15 16
     Optional<User> findByUsernameOrEmail(String username, String email);

+ 1
- 1
ZipTeamOrange-server/src/main/java/ZipTeamOrange/config/WebMvcConfig.java View File

@@ -12,7 +12,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
12 12
     @Override
13 13
     public void addCorsMappings(CorsRegistry registry) {
14 14
         registry.addMapping("/**")
15
-                .allowedOrigins("*")
15
+                .allowedOrigins("*", "")
16 16
                 .allowedMethods("HEAD", "OPTIONS", "GET", "POST", "PUT", "PATCH", "DELETE")
17 17
                 .maxAge(MAX_AGE_SECS);
18 18
     }