Skip to content

Commit

Permalink
More cleanup of unneeded things
Browse files Browse the repository at this point in the history
  • Loading branch information
marvac committed Mar 19, 2019
1 parent 57ed21b commit 0d43622
Show file tree
Hide file tree
Showing 25 changed files with 12 additions and 3,250 deletions.
3 changes: 2 additions & 1 deletion Client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"build-prod": "ng build --prod --base-href /friendster/"
},
"private": true,
"dependencies": {
Expand Down
8 changes: 0 additions & 8 deletions Client/src/app/components/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ export class HomeComponent implements OnInit {
constructor(private http: HttpClient) { }

ngOnInit() {
this.getValues();
}

getValues() {
this.http.get('http://localhost:54314/api/values').subscribe(res => {
this.values = res;
}, err => {
console.log(err);
});
}

startRegisterMode() {
Expand Down
6 changes: 4 additions & 2 deletions Client/src/app/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import { map } from 'rxjs/operators';
import { Observable, BehaviorSubject } from 'rxjs';
import { JwtHelperService } from '@auth0/angular-jwt'
import { User } from '../models/user';
import { environment } from 'src/environments/environment';

@Injectable({
providedIn: 'root'
})
export class AuthService {

private loginUrl = '/api/auth/login';
private registerUrl = '/api/auth/register';
private baseApiUrl = environment.baseApiUrl;
private loginUrl = `${this.baseApiUrl}/auth/login`;
private registerUrl = `${this.baseApiUrl}/auth/register`;
private jwtHelper = new JwtHelperService();

public currentUser: User;
Expand Down
4 changes: 3 additions & 1 deletion Client/src/app/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import { User } from '../models/user';
import { PaginatedResult } from '../models/pagination';
import { map } from 'rxjs/operators';
import { Message } from '../models/message';
import { environment } from 'src/environments/environment';


@Injectable({
providedIn: 'root'
})
export class UserService {
private usersUrl = '/api/users/';
private baseApiUrl = environment.baseApiUrl;
private usersUrl = `${this.baseApiUrl}/users/`;

constructor(private http: HttpClient) { }

Expand Down
2 changes: 1 addition & 1 deletion Client/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const environment = {
production: true,
apiUrl: 'api/'
baseApiUrl: '/friendster/api'
};
3 changes: 2 additions & 1 deletion Client/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
production: false,
baseApiUrl: '/api'
};

/*
Expand Down
39 changes: 0 additions & 39 deletions Controllers/ValuesController.cs

This file was deleted.

33 changes: 0 additions & 33 deletions Data/DataRepository.cs

This file was deleted.

13 changes: 0 additions & 13 deletions Data/IDataRepository.cs

This file was deleted.

1 change: 0 additions & 1 deletion Friendster.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

<ItemGroup>
<Folder Include="Client\src\app\components\members\member-edit\" />
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public void ConfigureServices(IServiceCollection services)
services.AddTransient<Seeder>();

services.Configure<CloudSettings>(Configuration.GetSection("CloudSettings"));
services.AddScoped<IDataRepository, DataRepository>();
services.AddScoped<IAuthRepository, AuthRepository>();
services.AddScoped<IFriendRepository, FriendRepository>();
services.AddScoped<LogActivity>();
Expand Down
Loading

0 comments on commit 0d43622

Please sign in to comment.