Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix]作品投稿画面のHTTP通信できるようにする #120

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ android {
buildFeatures {
dataBinding true
}
namespace 'com.example.funcy_portfolio_android'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.funcy_portfolio_android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ package com.example.funcy_portfolio_android.model.data
data class WorkData(
val title: String,
val description: String,
val thumbnail: String,
val user_icon: String,
val user_name: String,
val userID: String,
val images: List<ImageData>,
val URL: String,
val work_url: String,
val movie_url: String,
val tags: List<TagData>,
val group: String?,
val group: String,
val security: Int,
)

data class ImageData(
val Image: String
val image: String
)

data class TagData(
val Tag: String
val tag: String
)
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,27 @@ class WorkRegisterViewModel : ViewModel() {
description: String,
security: Int,
work_url: String,
youtube_url: String
youtube_url: String,
group: String,
user_icon: String,
user_name: String,
userID: String
): String? {
viewModelScope.launch {
val postTagList = stringTagListToTagList(tags)
res = workRepository.registerWork(
WorkData(
title,
description,
thumbnail.toString(),
user_icon,
user_name,
userID,
listOf(ImageData("")),
work_url,
youtube_url,
postTagList,
null,
group,
security
)
)
Expand Down