Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
mmntnth committed Jan 12, 2019
1 parent f0dea38 commit 87e627d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/server/Model/DB/ProgramsDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ abstract class ProgramsDB extends DBTableBase implements ProgramsDBInterface {
* @param extended extended
* @return string
*/
private createExtendedStr(extended: { [description: string]: string } | undefined, convertDBStr: boolean): string | null {
private createExtendedStr(extended: { [description: string]: string } | undefined, convertDBStr: string): string | null {
if (typeof extended === 'undefined') { return null; }

let str = '';
Expand Down
10 changes: 5 additions & 5 deletions src/server/Util/StrUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
namespace StrUtil {
/**
* 文字列をデータベース用文字列に変換する.
*
*
* convertDBStrの値によって以下のように文字列の変換を行う
* - "no": PostgreSQL非対応文字の削除
* - "twoByte": PostgreSQL非対応文字の削除,半角英数記号を全角に変換
* - 'no': PostgreSQL非対応文字の削除
* - 'twoByte': PostgreSQL非対応文字の削除,半角英数記号を全角に変換
* - else: PostgreSQL非対応文字の削除,全角英数記号を半角に変換
* @param str: string
* @param convertDBStr: string
* @param convertDBStr: string
* @return string
*/
export const toDBStr = (str: string, convertDBStr: string): string => {
const ret = convertDBStr === "no" ? str : convertDBStr === "twoByte" ? toDouble(str) : toHalf(str);
const ret = convertDBStr === 'no' ? str : convertDBStr === 'twoByte' ? toDouble(str) : toHalf(str);

return ret.replace(/\x00/g, ''); // PostgreSQL 非対応文字
};
Expand Down

0 comments on commit 87e627d

Please sign in to comment.